By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,106 Members | 2,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,106 IT Pros & Developers. It's quick & easy.

"Cross Tab" Table to "Simple" Query

P: 5
I have a table with the following Fields:
Article and 8 fields that are Dates. Under each date is a quantity.

I would like to run a query that would have only 3 columns:
Article, Date and Quantity

Thank you very much
Sep 6 '07 #1
Share this Question
Share on Google+
1 Reply


puppydogbuddy
Expert 100+
P: 1,923
I have a table with the following Fields:
Article and 8 fields that are Dates. Under each date is a quantity.

I would like to run a query that would have only 3 columns:
Article, Date and Quantity

Thank you very much
Try a union query like this, but use something other than Date as the name of your datefield in your table because Date is a reserved word in Access:
Expand|Select|Wrap|Line Numbers
  1. "Select article, datefield1 As datefield, quantity From YourTable
  2. Union Select Article, datefield2 As datefield, Quantity From YourTable
  3. Union Select Article, datefield3 As datefield, Quantity From YourTable
  4. Union Select Article, datefield4 As datefield, Quantity From YourTable
  5. Union Select Article, datefield5 As datefield, Quantity From YourTable
  6. Union Select Article, datefield6 As datefield, Quantity From YourTable
  7. Union Select Article, datefield7 As datefield, Quantity From YourTable
  8. Union Select Article, datefield8 As datefield, Quantity From YourTable";
Sep 6 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.