I know the subject is hard to understand.
See below. The result is from a SP. I would like the data from Example A to be reported like Example B with the grouping by Co, Contract, Customer, and Invoice and show the Invoice Date, the amount any paid dates and paid amounts related to that invoice, all lined up together.
Im stuck!
Thanks!
| Example A |
|
|
|
|
|
|
|
| ARCo |
InvoiceContract |
Customer |
Invoice |
TransDate |
AgeAmt |
PaidDate |
PaidAmount |
| 1 |
100001.01 |
806 |
39937 |
4/19/2013 |
450.00 |
|
- |
| 1 |
100001.01 |
806 |
39937 |
|
- |
7/5/2013 |
(450.00) |
| 1 |
100001.01 |
806 |
40221 |
5/31/2013 |
684.51 |
|
- |
| 1 |
100001.01 |
806 |
40221 |
|
- |
7/12/2013 |
(684.51) |
| 1 |
100001.01 |
806 |
40271 |
5/31/2013 |
33,837.97 |
|
- |
| 1 |
100001.01 |
806 |
40271 |
|
- |
7/5/2013 |
(30,970.46) |
| 1 |
100001.01 |
806 |
40271 |
|
- |
7/12/2013 |
(2,867.51) |
| 1 |
100001.01 |
806 |
40311 |
6/17/2013 |
48,731.52 |
|
- |
| 1 |
100001.01 |
806 |
40311 |
|
- |
7/12/2013 |
(46,557.17) |
| 1 |
100001.01 |
806 |
40311 |
|
- |
7/25/2013 |
0.05 |
| 1 |
100001.01 |
806 |
40311 |
|
- |
7/26/2013 |
(2,174.40) |
|
|
|
|
|
|
|
|
| Example B |
|
|
|
|
|
|
|
| ARCo |
InvoiceContract |
Customer |
Invoice |
TransDate |
AgeAmt |
PaidDate |
PaidAmount |
| 1 |
100001.01 |
806 |
39937 |
4/19/2013 |
450.00 |
7/5/2013 |
(450.00) |
| 1 |
100001.01 |
806 |
40221 |
5/31/2013 |
684.51 |
7/12/2013 |
(684.51) |
| 1 |
100001.01 |
806 |
40271 |
5/31/2013 |
33,837.97 |
7/5/2013 |
(30,970.46) |
| 1 |
100001.01 |
806 |
40271 |
|
- |
7/12/2013 |
(2,867.51) |
| 1 |
100001.01 |
806 |
40311 |
6/17/2013 |
48,731.52 |
7/12/2013 |
(46,557.17) |
| 1 |
100001.01 |
806 |
40311 |
|
- |
7/25/2013 |
0.05 |
| 1 |
100001.01 |
806 |
40311 |
|
- |
7/26/2013 |
(2,174.40) |