Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Results from 2 databases, same table structure

Status
Not open for further replies.

alebox20

Programmer
Oct 19, 2004
72
BR
I have two databases with the same table structure. I need to create a report wich shows the results of two tables.
In example:

DB1.TABLE
ID COD NAME
1 1 XXX
1 2 YYY

DB2.TABLE
ID COD NAME
2 3 XXX
2 4 YYY


REPORT RESULTS
ID COD NAME
1 1 XXX
1 2 YYY
2 3 XXX
2 4 YYY


My question is: is there a way to create this kind of report?

thanks!
 
Hi,
There are several ways, most of which are database-specific.

Which version Of CR?
What database and connection method?

The easiest way is to create a view using the UNION operator to combine the 2 tables and base your report on the view.

You could also use a command object to create the union and report off that..

There are others...





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
have you not tried the UNION ALL queyr i suggested in other forums...

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top