March 2, 2009 at 11:03 pm
I want to do pivoting from a table output. I am generating a report as below.
Table :1
Customer due amountbuckets
xyz 1000 1-5 days
abc 10000 21-30 days
The parameter sent to the report is ('1-5 days','6-10 days','11-20 days','21-30 days').
I want it to be as below
Table :2
Customer1-5 days 6-10 days11-20 days21-30 days
xyz1000
abc 10000
I tried with pivot operator in sql 2005 for table :1, but the buckets column does not contain all the intervals(1-5 days.......21-30 days) error is thrown,saying invalid column name 6-10 days ....
Please help to acheive this..
March 3, 2009 at 11:24 pm
Hi..:)
Regards frend!!
Did u try using Matrix Reports for the same issue?
If not..yet...please try it once...I guess..it can b acheived in Matrix Reports Layout...
Thanks,
Niraj
March 4, 2009 at 8:28 am
Hello,
In order to show all "buckets" as in table 2, you would need to return all available values in the dataset - even if the customer & due amount is NULL. In the matrix, you will then see all customers and buckets, regardless of whether there is a due amount or not. See the attached image for an example.
Hope this helps!
Michael R.
March 9, 2009 at 7:58 am
Thanks a lot Niraj, I got to know more about matrix, also I got to do it with pivot operator in SQL 2005...
March 9, 2009 at 7:59 am
Thanks mate, it really helped........
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply