I have the following table.
ID jobnumber clientname stateabbr statecount entrydate entrymonth entryyear dprevenue
1 12345 Test1 MD 50 2/28/2012 02 2012 500.00
2 12345 Test1 PA 150 2/28/2012 02 2012 500.00
3 67890 Test2 VA 250 2/29/2012 02 2012 1000.00
I would like to return a recordset like this:
job # Client Mailing Quantity MD Mailing Quantity PA Mailing Quantity VA Mailing Quantity Total Revenue
12345 Test1 200 50 100 $500.00
67890 Test2 250 5 2 250 $1,000.00
Keep in mind that there could be other states that would be included in this query, not just MD, PA and VA.
I can not seem to think of a way to do all of this in a query.
Any help is greatly appreciated.
Thanks.
Swi
ID jobnumber clientname stateabbr statecount entrydate entrymonth entryyear dprevenue
1 12345 Test1 MD 50 2/28/2012 02 2012 500.00
2 12345 Test1 PA 150 2/28/2012 02 2012 500.00
3 67890 Test2 VA 250 2/29/2012 02 2012 1000.00
I would like to return a recordset like this:
job # Client Mailing Quantity MD Mailing Quantity PA Mailing Quantity VA Mailing Quantity Total Revenue
12345 Test1 200 50 100 $500.00
67890 Test2 250 5 2 250 $1,000.00
Keep in mind that there could be other states that would be included in this query, not just MD, PA and VA.
I can not seem to think of a way to do all of this in a query.
Any help is greatly appreciated.
Thanks.
Swi