tcottrill
asked on
Showing all values in a cell in a matrix in SQL Server 2005
Here's my deal. I've got a pretty simple matrix set up that is pulling data from a reasonably complex query. The end result is a matrix that looks something like this
Date
______
Keywords | ranking
For the Most part, it's working great.
The problem is that the ranking field is currently only displaying the top value, while it could have multiple values. I don't want to do a sum or any kind of aggregation. Ideally, I'd just want a comma seperated list or running list of the values.
For example, if a person ranks for an term in two places in a month, I'd like it to display "1, 17" rather than just 1....
Any and all help is greatly appreciated.
Date
______
Keywords | ranking
For the Most part, it's working great.
The problem is that the ranking field is currently only displaying the top value, while it could have multiple values. I don't want to do a sum or any kind of aggregation. Ideally, I'd just want a comma seperated list or running list of the values.
For example, if a person ranks for an term in two places in a month, I'd like it to display "1, 17" rather than just 1....
Any and all help is greatly appreciated.
ASKER
Thank you. Your solution is very workable, and might work in a pinch.
I'd love to see your XML trick
I'd love to see your XML trick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The other option is to play with the query from the database and turn that column into a comma separated string. Let me know if you need to go that route, I have an XML trick to do that.