Report from different tables which are not related

  • Thread starter Thread starter Ixak
  • Start date Start date
I

Ixak

Hello,
I´m designing a DB for a dress shop in which there are 4 different sections:
-babies
-children
-men
-women
For each section there is a table, eg:
Women:
Code_women
product_women
price
Men:
Code_men
product_men
price

These tables are not related between them.
My aim is to create a report with the sales of all the sections:
Babies
T-shirts
red 40
blue 80
Men
....
....
I can do 4 different queries, one per each section and obtain these
information, actually, I´d like to join all of them in a report.
How could I do this?
Thanks for your help
 
I think it is a mistake to create 4 different tables when you could use one
table with a field for the section name. If you can't or won't change your
structure, you can use a union query to create a virtual single table:

SELECT Code_Women as Code, Product_Women as Product, Price
FROM [Women]
UNION ALL
SELECT Code_Men, Product_Men, Price
FROM [Men]
UNION ALL
.....
FROM ....;

Save this union query and use it as your report's record source.
 

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

Back
Top