My goal is to get the customer balance report but I am stuck in my query where I can get the doc type of a certain column. I have my query
SELECT
ROW_NUMBER() OVER( ORDER BY DR.id ) AS 'NO.' ,
CONVERT(VARCHAR(13), CAST(DR.doc_date AS DATE), 100) AS 'DOC DATE',
SR.net_total,
SR.dell_col_charge,
SR.CDW,
sp.amount
FROM
[dbo].[doc_customer] DC
LEFT JOIN [dbo].[doc_rent] DR ON DR.doc_sourced_customer_id = DC.id
LEFT JOIN [dbo].[slip_rent] SR ON SR.doc_sourced_doc_rent_id = DR.id
LEFT JOIN [dbo].[slip_rent_payment] SP ON SP.doc_sourced_rent_id = DR.id
as u can see in my query it returning the net total, charge, cdw, and amount but my goal is to show them in 1 column in a different rows. u can see on the image I attached that's my goal of my query.
anyone have the idea ? thanks.
