Union Query

  • Thread starter Thread starter ftwguy
  • Start date Start date
F

ftwguy

I am trying to query 5 .mdb files which have their own tables, queries,
reports. Each DB table covers a product such as snack food, soda, water,
milk, ice cream based on customer purchases. There are obviously duplicate
customers in each table. All customers have a unique ID such as DFW123,
FTW123, HOU457 etc. This ID does appear in all 5 database tables since they
may buy all products.

I need to get a query to provide this for each :
CustomerID, StoreName, Address, City, Zip, Snack Food, Soda, Water, Milk, IC

(the above would be the columns)

CustomerID, StoreName, Address, City, Zip, Snack Food, Soda, Water, Milk, IC
DFW123 My Grocery 4567 S Dal 75 100 239 156
65 249
FTW123 Ziggy's 346 N Ftw 76 239 45
100 78 133

So basically, each Customer ID would show their total purchases of each
product from 5 different tables. I thought a Union All Query would work, but
what I end up with is 1 column that sums the numbers rather than list them
out under individual columns as above.
 
Use a union query as the source for a crosstab query. Set the column heading
to your product values.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access 2007 Report 4
Union Query with division 2
SUM in a UNION query 2
Union Query 7
Union Query of Queries 4
Union Query 2
Append Union Queries 2
Union Query - Select Distinct 2 fields 7

Back
Top