japeconsulting
Programmer
Hi
I have the following table entries
Date Acc Ref Amount Type
01/02/2018 ABC001 123 100 PAY
05/01/2018 ABC001 123 200 INV
06/01/2018 ABC001 123 300 INV
so - Select Date, Acc, Ref, Amount, Type from Transactions
I need to write a sql server statement that results in these entries, so basically takes the date and the amount from the payment line and displays it on all lines
Date Acc Ref Amount Type Payment Amount Payment date
01/02/2018 ABC001 123 100 PAY 100 01/02/2018
05/01/2018 ABC001 123 200 INV 100 01/02/2018
06/01/2018 ABC001 123 300 INV 100 01/02/2018
I dont want to group by the reference field as I need to see all rows but use that as the selection that the payment comes from.
Hope this makes sense and thanks in advance
I have the following table entries
Date Acc Ref Amount Type
01/02/2018 ABC001 123 100 PAY
05/01/2018 ABC001 123 200 INV
06/01/2018 ABC001 123 300 INV
so - Select Date, Acc, Ref, Amount, Type from Transactions
I need to write a sql server statement that results in these entries, so basically takes the date and the amount from the payment line and displays it on all lines
Date Acc Ref Amount Type Payment Amount Payment date
01/02/2018 ABC001 123 100 PAY 100 01/02/2018
05/01/2018 ABC001 123 200 INV 100 01/02/2018
06/01/2018 ABC001 123 300 INV 100 01/02/2018
I dont want to group by the reference field as I need to see all rows but use that as the selection that the payment comes from.
Hope this makes sense and thanks in advance