An Sybase IQ server may have several local databases running at one time. By defining tables in other local Sybase IQ databases as remote tables, you can perform cross database joins.
For example, if you are using database db1 and you want to access data in tables in database db2, you need to set up proxy table definitions that point to the tables in database db2. For instance, on an Sybase IQ named testasiq, you might have three databases available, db1, db2, and db3.
If using ODBC, create an ODBC data source name entry for each database you will be accessing.
Connect to one of the databases that you will be performing joins from. For example, connect to db1.
Perform a CREATE SERVER for each other local database you will be accessing. This sets up a loopback connection to your Sybase IQ server.
CREATE SERVER local_db2 CLASS 'asaodbc' USING 'testasiq_db2' CREATE SERVER local_db3 CLASS 'asaodbc' USING 'testasiq_db3'
or using JDBC:
CREATE SERVER local_db2 CLASS 'asajdbc' USING 'mypc1:2638/db2' CREATE SERVER local_db3 CLASS 'asajdbc' USING 'mypc1:2638/db3'
Create proxy table definitions using CREATE EXISTING TABLE to the tables in the other databases you want to access.
CREATE EXISTING TABLE employee AT 'local_db2...employee'