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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL to concatonate a string field

Status
Not open for further replies.

heyinlangley

Programmer
Oct 6, 2000
10
CA
I have a normalized table as follows:

Store Userid
3 bob
3 jim
3 joe
4 bob
4 sally

and would like to build a view on top that transforms the data to:

store userstring
3 bob,jim,joe
4 bob,sally

We're also using IBM UDB 8.2. Does anyone have any ideas?


thanks
 
My thought is, "Dont do that".

Or do it in your application in a loop, not in SQL.

But if you must, in Transact SQL (for Microsoft SQL Server)
see
That thread gives a stored procedure, not a SQL statement.

Your database may have similar procedural language.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top