Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hi guys. I'm having problems genera

Status
Not open for further replies.

jmerencilla

Programmer
Jul 17, 2002
123
0
0
SG
hi guys. I'm having problems generating the proper t-sql statement that will convert the following result

select name from users
name
-------------
User1
User2
User3
User4

to this result
User1 | User2 | User3 | User4
-----------------------------
User1 User2 User3 User4

pls help.
thanks
jun
 
Not _entirely_ sure what you are asking here, but I think what's covered in this faq (faq183-2146) will help you out.

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
jmerencilla,

From the way you posed your question, you appear to be asking how to pivot data, but this usually reserved for aggregating data (e.g. summing data from a table - counting the number of instances of a particular value in a column).

Can you give a little bit moore info, please.

Logicalman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top