A
Anonymous
Hello again to the Access experts out there! I have a table with 7 fields.
They are:
IndexID, Date1, Date1Qty, Date2, Date2Qty, Date3, Date3Qty
I'm essentially trying to make a query that ends up with 3 fields - IndexID,
Date, Qty. The trick is that I need the query to combine all the date
fields into a single date field result set and the associated Qty fields
into a single Qty field. Then, I need to order the whole thing descending
by date. So if my table contains the following data:
0, 7/7/05, 900, 7/10/05,800, 7/13/05, 500
1, 7/12/05,300,null,null,null,null
2, 7/6/05, 200, 7/11/05, 40, null, null
I need this:
0, 7/13/05, 500
1, 7/12/05, 300
2, 7/11/05, 40
0, 7/10/05, 800
0, 7/7/05, 900
2, 7/6/05, 200
Can I do this with a Union Query? Seems like I can't because the field
names are different (date1, date2, date3) and (date1qty, date2qty,
date3qty). As always, any help would be GREATLY appreciated! Happy
Thanksgiving!
They are:
IndexID, Date1, Date1Qty, Date2, Date2Qty, Date3, Date3Qty
I'm essentially trying to make a query that ends up with 3 fields - IndexID,
Date, Qty. The trick is that I need the query to combine all the date
fields into a single date field result set and the associated Qty fields
into a single Qty field. Then, I need to order the whole thing descending
by date. So if my table contains the following data:
0, 7/7/05, 900, 7/10/05,800, 7/13/05, 500
1, 7/12/05,300,null,null,null,null
2, 7/6/05, 200, 7/11/05, 40, null, null
I need this:
0, 7/13/05, 500
1, 7/12/05, 300
2, 7/11/05, 40
0, 7/10/05, 800
0, 7/7/05, 900
2, 7/6/05, 200
Can I do this with a Union Query? Seems like I can't because the field
names are different (date1, date2, date3) and (date1qty, date2qty,
date3qty). As always, any help would be GREATLY appreciated! Happy
Thanksgiving!