Hello,
I am having this moment that won't let me move forward. I am trying to add address from RM00102, but when I do join the RM00102 it will return many lines with similar data. I stumped to cannot think anything else. I need to add address each line, but without repeating data. Please advise.
select
CM.CUSTNMBR Customer_ID,
CM.CUSTNAME Customer_Name,
case RM.RMDTYPAL
when 1 then 'Sale / Invoice'
when 3 then 'Debit Memo'
when 4 then 'Finance Charge'
when 5 then 'Service Repair'
when 6 then 'Warranty'
when 7 then 'Credit Memo'
when 8 then 'Return'
when 9 then 'Payment'
else 'Other'
end Document_Type,
RM.DOCNUMBR Document_Number,
RM.DOCDATE Document_Date,
RM.DUEDATE Due_Date,
S.LASTPYDT Last_Payment_Date,
case
when RM.RMDTYPAL < 7 then RM.ORTRXAMT
else RM.ORTRXAMT * -1
end Document_Amount,
case
when RM.RMDTYPAL < 7 then RM.CURTRXAM
else RM.CURTRXAM * -1
end Unapplied_Amount,
case
when...< 7 then RM.CURTRXAM< 7 then RM.ORTRXAMT