Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Seperating Query Results

Author  Topic 

gogetter
Starting Member

18 Posts

Posted - 2008-02-29 : 12:45:14
Does anyone know if it's possible to seperate one row into multiple rows in a single query? For example; I have a table that has about 50 columns that contain data, the data came from a query that joined from three seperate sources. I now need to export this data to a text file in a specific format so the rows need to be seperated at a certain point. Say I have firstname,lastname,SSN,JobTitle in one row but I need to to look like this:

firstname
lastname
SSN
JobTitle

Can this be done in SQL?

X002548
Not Just a Number

15586 Posts

Posted - 2008-02-29 : 14:42:19
Of course

You gonna need a key on each row?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Jeff Moden
Aged Yak Warrior

652 Posts

Posted - 2008-03-04 : 22:25:53
Heh... So, does that deserve a "WTF" or does the OP not answering a simple question happen a lot on this forum?

--Jeff Moden
Go to Top of Page
   

- Advertisement -