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

Display values from multiple rows in one row Expand / Collapse
Author
Message
Posted Monday, September 24, 2012 5:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 24, 2012 5:21 AM
Points: 2, Visits: 5

Hi,

Lets say, I have a table with Gender,Name and Age.


Gender Name Age
--------------------
Male John 52
Female Joe 33
Male Jim 42

I want the output to be like;

Male John 52 Jim 42
Female Joe 33

can anybody help me this on SQL SERVER 2003...??
Post #1363424
Posted Monday, September 24, 2012 5:38 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, October 13, 2014 6:42 AM
Points: 5,216, Visits: 5,111
Duplicate post

Replies here please http://www.sqlservercentral.com/Forums/Topic1363376-391-1.aspx




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1363430
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse