Rows into columns
Hi,
I have two table customer_master and payment
customer_master
customer_cd char(5)
customer_name varchar2(50)
payment
customer_cd char(5),
transaction_number number,
transaction_date date
Now my client wants an quarterly ageing report in the format shown below (This is for the first quarter)
<----Jan----> <----Feb----> <----Mar---->
Code Name Day Amt Tran# Day Amt Tran# Day Amt Tran#
1 A 02 100 22 13 200 34 07 500 158
2 B 08 150 555 01 600 118 25 150 333
code -> customer code, Day-> day of transaction date
tran# -> transaction no.
Please note, it is possible that a customer pays more than once in a month. so in this case that record will be below the first record of that customer and its data aligned with the month of the payment.
I am using Forms 6 and will create this report through Report Builder.
Could anyone help me out.
Thanks
|