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)
 concatenate multiple rows from foreign table

Author  Topic 

ickynay
Starting Member

1 Post

Posted - 2005-04-27 : 04:21:31
Does anybody have insight into how to create a concatenated string for a view using 1+ records from a foreign table? Here's a sample dataset:

tblPrimary
--------------------
1 | shopping list A

tblForeign
---------------------
21 | 1 | apples
32 | 1 | oranges
35 | 1 | milk


qryConcat
----------------------
1 | shopping list A | apples oranges milk

I'm pretty sure this can be done but I have no clue how to iterate over all foreign rows and concatenate them into one single column in a view.

Thanks for your help!!! :)

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2005-04-27 : 05:01:04
http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=48820

OS
Go to Top of Page
   

- Advertisement -