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)
 How to return data in horizontal fashion?

Author  Topic 

wgpubs
Yak Posting Veteran

67 Posts

Posted - 2005-04-05 : 14:21:01
I have the following table:

Item Table (ItemID, ItemName)

If I do SELECT ItemID, ItemName FROM ItemTable I get the rows returned vertically, e.g.
- 1 Apples
- 2 Oranges
- 3 Pears

What I want to be able to do is return this info (ItemName) in a single rows as such ...
Apples Oranges Pears

Any ideas how to best accomplish this? Thanks - wg

DustinMichaels
Constraint Violating Yak Guru

464 Posts

Posted - 2005-04-05 : 14:42:53
http://www.sqlteam.com/item.asp?ItemID=2368
Go to Top of Page
   

- Advertisement -