Home > database >  Datawindow query union 2 library data
Datawindow query union 2 library data

Time:09-18


Existing two table structure, is exactly the same table structure, database DB1 tb_1 respectively and DB2 database tb_2,
Now I want to use a datawindow query a select * from tb_1 union select * from tb_2 data,
How to achieve this?

CodePudding user response:

If it is the same SQL Server instance to try in the connection of db1 write:

Select *
The from tb_1 tb1 full join db2. The dbo. Tb_2 tb2 on tb1. C=tb2. C

CodePudding user response:

refer to the original poster tkx180 response:
2 table structure, existing table structure, same database DB1 tb_1 respectively and DB2 database tb_2,
Now I want to use a datawindow query a select * from tb_1 union select * from tb_2 data,
How to achieve this?


If oracle is, can be done with the data link

CodePudding user response:

The use of the ORACLE database link [the]

The 2005-09-25 11:10:07 | classification: the default classification | size subscription

1, the establishment of the database link
In this database to build a data link TEST.US.ORACLE.COM, pointing to another database such as QJL
- Drop existing database link
The drop database link TEST.US.ORACLE.COM;
- the Create database link
The create database link TEST.US.ORACLE.COM
Connect to TBMBEMS identified by TBMBEMS using 'QJL';
2, the use of the data link
In this method used in the database as follows,
Select * from [email protected] where docct & lt;> 'A'
  • Related