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

Urgent Help Regarding Union Select Query

Status
Not open for further replies.

cazellnu

Technical User
Aug 15, 2002
41
CA
All:

I had been asked to create a report against Pervasive 8 using crystal but similar is currently sitting in different table.

I used the union query to links these tables as follow

Select "t1"."Company", "t1"."Product", "t1"."Sales" from "t1"
Union
Select "t2"."Company", "t2"."Product", "t2"."Sales"
from "t2"

The issues is I need to have a dataset to calculate the total group by the company number and product number with sql similar to below

Select "u"."Company", "u"."Product", "u"."Sales"
from ([Union query above]) as "u"

I cannot get it working and wonder how I can create something similar within pervaisve

Any help will be greatly apperciate. Thanks a million!!!!
 
Apologize for the wrong sql.

I'm trying to get the total sales grouped by the "Company" with number accross different table (sitting in different database) with exactly the same database schema.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top