Okay -
Script:
(select
CUSTNMBR,
APTODCNM,
CUSTNMBR,
CASE WHEN APFRDCTY='9' then sum(APPTOAMT) else '0' end as Cash,
CASE WHEN APFRDCTY='8' then sum(APPTOAMT) else '0' end as Credits1,
CASE WHEN APFRDCTY='7' then sum(APPTOAMT) else '0' end as Credits2
from RM30201 A
where APTODCTY='1' and APTODCNM like 'REF%' AND DATE1 >= '2017-01-01' and APTODCNM = 'REF371277'
GROUP BY CUSTNMBR, APTODCNM, APFRDCTY) BT
Returns: Multiple lines for a single document (with two payment types)
I would like the dataset to be a singular line regardless of multiple payments and payment types. I think I need a cross join RM30201 to itself.........having a hard time getting started.
Thanks in advance,
Bron