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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Unions?

Status
Not open for further replies.

kutz13

IS-IT--Management
Feb 24, 2004
62
GB
Forgive what may be an obvious question to some of you out there but I could use some pointers in solving a problem.
We have two group companies each with their own DB on our SQL server. We use Crystal Reports 8.5 to report on various aspects. I wrote most of the reports for only one DB, and it was simple enough to add a UNION statement when the second came along in order to re-use the reports.
Now I find out there is a third company DB coming along!
Not being much of a SQL guru(!) I was wondering how I would go about linking all three DB's. I should add that the structure of each DB is identical, i.e. same tables, columns etc.
Any help much appreciated.
 
I'm not sure I understand what you're asking. Are you trying to add in all company data from the 3 into the same report or simply trying to recycle the report so it shows 1 company's data?

If your queries are on the SQL Server end, and you're trying to add all the data together, adding another UNION should be fine. The more you add, though, the more processing time it's going to take.



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Adding a third union was what I was querying, glad to hear its that simple!
Just for the record - the DB's refer to the same company but at different stages of it's history. So to ensure continuity of history I'll need to take account of them all.
Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top