Tomas Rutkauskas
Is it possible for access data from two different database such as...
SELECT A.EMP_NAME, B.DEPT_DESC FROM DB1.TB1 A, DB2.TB1 B WHERE
A.EMP_DEPT = B.DEP_KEY
If so how?
Answer:
Yes, this is called a heterogeneous join. An example of this is like:
1 2 SELECT DISTINCT c.cust_no, c.state, o.order_no, i.price
3 FROM ':Local_alias:customer.db' c,
4 ':IB_alias:order' o,
5 ':SYB_alias:lineitem' i
6 WHERE o.cust_no = c.cust_no and7 o.order_no = i.order_no
The first part between the :: is the BDE alias for the database you want to include
in the heterogeneous
join.