I am looking to create a query to transpose my union query into rows based on two columns. I'm starting with 7 columns that I need to group on all the matching data in columns 1 through 5, then count how many rows this group has on column 6 and 7. The max allowed in each group is 10...so the new query will have create column1A and column2A up to column1J and column column2J, allowing blanks whereever.
I am not summing anything
I have pasted a sample of my union query results and what I am trying to accomplish in the new query.
this is a sample of my union query results:
sl1 sl2 sl3 acct name invno amt
150 12345 ABC Company IN099999997 $100.00
150 12345 ABC Company IN099999998 $150.00
150 12345 ABC Company IN099999999 $200.00
117 134 12449 123 Company IN088888867 $10.00
117 134 12449 123 Company IN088888967 $1,000.00
220 12549 Heidi's Business IN099999972 $63.99
I need a query to look like this:
sl1 sl2 sl3 acct name invno1 amt1 invno2 amt2 invno3 amt3
150 12345 ABC Company IN099999997 $100.00 IN099999998 $150.00 IN099999999 $200.00
117 134 12449 123 Company IN088888867 $10.00 IN088888967 $1,000.00
220 12549 Heidi's Business IN099999972 $63.99
I can't seem to get my head around how I need to do this.
I would like to keep it within access - and the new query is exported to excel to be used in a word mail merge
can someone point me in the right direction?
I am not summing anything
I have pasted a sample of my union query results and what I am trying to accomplish in the new query.
this is a sample of my union query results:
sl1 sl2 sl3 acct name invno amt
150 12345 ABC Company IN099999997 $100.00
150 12345 ABC Company IN099999998 $150.00
150 12345 ABC Company IN099999999 $200.00
117 134 12449 123 Company IN088888867 $10.00
117 134 12449 123 Company IN088888967 $1,000.00
220 12549 Heidi's Business IN099999972 $63.99
I need a query to look like this:
sl1 sl2 sl3 acct name invno1 amt1 invno2 amt2 invno3 amt3
150 12345 ABC Company IN099999997 $100.00 IN099999998 $150.00 IN099999999 $200.00
117 134 12449 123 Company IN088888867 $10.00 IN088888967 $1,000.00
220 12549 Heidi's Business IN099999972 $63.99
I can't seem to get my head around how I need to do this.
I would like to keep it within access - and the new query is exported to excel to be used in a word mail merge
can someone point me in the right direction?