FROM ":database_reference:table_reference", ":database_reference:table_reference" [,":database_reference:table_reference"...]
WHERE predicate [AND predicate...]
Description
Use a heterogeneous join to join two tables that reside in different databases. The joined tables may be of different types (like dBASE to Paradox or Paradox to InterBase), but you can only join tables whose database types are accessible through the BDE (local, ODBC, or SQL Links). A hetergeneous join may be any of the joins supported by local SQL. The difference is in the syntax for the table reference: the database containing each table is specified in the table reference, surrounded by colons and the whole reference enclosed in quotation marks. The database specified as part of the table reference may be a drive and directory reference (for local tables) or a BDE alias.
SELECT *
FROM ":DBDEMOS:customer.db" C, ":BCDEMOS:orders.db" O
> 서로다른 DB에 존재하는 A, B 테이블을 서로 JOIN하는
> 방법을 찾고 있습니다.
> 여러고수님들의 조언을 급히 기다리겠습니다.
>
> 즐거운 하루되세요...
안녕하세요..
제가 예전에 델파이메뉴얼에서 본게 기억이나서 헬프를 찾았더니
자세하게 예제까기 나와있네요..
참고로 다른DB안의 table조인은 앨리어스를 가지고
조인을 한답니다. 참고가 되셨는지..
--------------------------------------------------------------
헬프색인 : Heterogeneous joins
Joins two tables from different databases.
SELECT column_list
FROM ":database_reference:table_reference", ":database_reference:table_reference" [,":database_reference:table_reference"...]
WHERE predicate [AND predicate...]
Description
Use a heterogeneous join to join two tables that reside in different databases. The joined tables may be of different types (like dBASE to Paradox or Paradox to InterBase), but you can only join tables whose database types are accessible through the BDE (local, ODBC, or SQL Links). A hetergeneous join may be any of the joins supported by local SQL. The difference is in the syntax for the table reference: the database containing each table is specified in the table reference, surrounded by colons and the whole reference enclosed in quotation marks. The database specified as part of the table reference may be a drive and directory reference (for local tables) or a BDE alias.
SELECT *
FROM ":DBDEMOS:customer.db" C, ":BCDEMOS:orders.db" O
WHERE (C.custno = O.custno)
--------------------------------------------------------------