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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-07-31 : 08:33:18
|
| Darrin writes "Hello...I’m trying to figure out a way to join two tables (one to many relationship) and have a single record returned. The single record would contain a column that concatenates the foreign keys from the other table...(that’s confusing even when i read it)currently I get a result set like this:id name productId--- --------- ---------1 a 11 a 21 a 32 b 12 b 3Here the id and name column are located in table 1, the productId comes from the second tableI would like the result to be like thisid name AllProducts--- --------- ---------1 a 1,2,32 b 1,3Any ideas?Thanks!" |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2003-07-31 : 08:57:34
|
| search here for 'COALESCE' and CSV.this style of problem has come up many a time before, with appropriate solutions. |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
|
|
|
|
|