Antanas wrote:
I have one table TABLE1 in X db, and another table TABLE2 in Y db.
When I execute the following:
CONNECT TO X;
SELECT * from TABLE1, TABLE2;
I get error:
SQL0204N "TABLE2" is an undefined name. SQLSTATE=42704
How can make this query work?
You can only connect to one database at a time in DB2 and you must be
connected to a database in order to query a table in that database. The
only other option is to define a Federated database (a way to define one
logical database that has a "view" of other databases) and connect to
that federated database. See the DB2 doc at
http://www-306.ibm.com/software/data...manualsv8.html
in particular, the "Federated Systems Guide". You do not need to
purchase Information Integrator if you only want to access DB2 databases.
Larry Edelstein