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

Print data left to right but not a Matrix Expand / Collapse
Author
Message
Posted Tuesday, March 26, 2013 2:05 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 2:24 PM
Points: 3, Visits: 108
I've seen questions here after searching but the answers just don't seem to work for me.

Sample Data:

Day-----------Name
Monday-------Lisa
Monday-------Tom
Monday-------Steve
Tuesday------Sally
Tuesday------Mike

I would like my output to look like this:

Row1: Monday Lisa Tom Steve
Row2: Tuesday Sally Mike

Is this still a matrix? I can't get my row groups and column groups to format the data like above.

Thank you.
Post #1435684
Posted Tuesday, March 26, 2013 2:17 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:56 PM
Points: 13,078, Visits: 12,529
fbozek (3/26/2013)
I've seen questions here after searching but the answers just don't seem to work for me.

Sample Data:

Day-----------Name
Monday-------Lisa
Monday-------Tom
Monday-------Steve
Tuesday------Sally
Tuesday------Mike

I would like my output to look like this:

Row1: Monday Lisa Tom Steve
Row2: Tuesday Sally Mike

Is this still a matrix? I can't get my row groups and column groups to format the data like above.

Thank you.


Generating a query to produce results like this isn't too bad. Take a look at the links in my signature about cross tabs.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1435687
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse