Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Matrix Tool Expand / Collapse
Author
Message
Posted Thursday, September 19, 2013 9:46 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 9:09 AM
Points: 215, Visits: 638
I am trying to get the result from one data set in a pivot style....
Input
Salesid, CustId,region ,7-2013 6-2013....................(Past12 months)
1 1 NY 500 200
1 1 TX 200 400
1 2 NY 300 300
2 2 TX 400 200


Output Expected
When I pass values SalesId = 1 , CustiD = 1
It should show me
Salesid, CustId,region ,7-2013 6-2013....................(Past12 months)
1 1 NY 500 200
1 1 TX 200 400

But its just showing me the 1st rec
Salesid, CustId,region ,7-2013 6-2013....................(Past12 months)
1 1 NY 500 200

The result shows up fine when I use Table, But doesn't with Matrix.

Kindly advise?


Post #1496471
Posted Thursday, September 19, 2013 12:03 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Thursday, July 24, 2014 9:07 AM
Points: 11,157, Visits: 12,899
Need more information. Can you post the query? It sounds like you aren't getting the results you are expecting back from the query.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #1496532
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse