Join Support Between Stores or Databases

Any join within a given Sybase IQ database are supported. This means that you can join any system or user table in the Catalog Store with any table in the IQ Store, in any order.

Joining Adaptive Server and Sybase IQ Tables

Joins of Sybase IQ tables with tables in an Adaptive Server database are supported under the following conditions:
  • The Sybase IQ database can be either the local database or the remote database.

  • If a Sybase IQ table is to be used as a proxy table in ASE, the table name must be 30 characters or fewer.

  • To join a local Adaptive Server table with a remote Sybase IQ 12 table, the ASE version must be 11.9.2 or higher, and you must use the correct server class:

    • To connect from a front end of Adaptive Server Enterprise 12.5 or higher to a remote Sybase IQ 12.5 or higher, use the ASIQ server class, which was added in ASE 12.5.

    • To connect from a front end of Adaptive Server Enterprise 11.9.2 through 12.0 to a remote Sybase IQ 12.x (or SQL Anywhere 6.x or higher), you must use server class ASAnywhere.

  • When you join a local Sybase IQ table with any remote table, the local table must appear first in the FROM clause, which means the local table is the outermost table in the join.

Joins between Sybase IQ and Adaptive Server Enterprise rely on Component Integration Services (CIS).

For more information on queries from Adaptive Server Enterprise databases to Sybase IQ, see Component Integration Services Users's Guide in the Adaptive Server Enterprise core documentation set.

For more information on queries from Sybase IQ to other databases, see Querying remote and heterogeneous databases.

Joining SQL Anywhere and Sybase IQ Tables

The CHAR data type is incompatible between SQL Anywhere and Sybase IQ when the database is built with BLANK PADDING OFF. If you want to perform cross-database joins between SQL Anywhere and Sybase IQ tables using character data as the join key, use the CHAR data type with BLANK PADDING ON.

Note:
Sybase IQ CREATE DATABASE no longer supports BLANK PADDING OFF for new databases. This change has no effect on existing databases. You can test the state of existing databases using the BlankPadding database property:
select db_property ( ‘BlankPadding’ )

Sybase recommends that you change any existing columns affected by BLANK PADDING OFF, to ensure correct join results. Recreate join columns as CHAR data type, rather than VARCHAR. CHAR columns are always blank padded.