Link to home
Start Free TrialLog in
Avatar of GordonPrince
GordonPrinceFlag for United States of America

asked on

return a string with a series of values in it

I have a view that returns several rows. I want to add another column to the view that contains a string with the results of another select statement (that's related to the main view's results) in it.

The select statement I want to add should return
"Fred Flintstone, Barney Rubble, John Johnson"
if there are 3 rows found by the "other" select statement.
There could be 0 rows found, there are usually 2 rows, there could be 10-15 rows found.

So my view will return
col1, col2, col3, "Fred Flintstone, Barney Rubble, John Johnson" as col4

What's a good way to do this?
ASKER CERTIFIED SOLUTION
Avatar of Chris Luttrell
Chris Luttrell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I somehow get the feeling they are using SQL Server 2000. If that is the case then they are going to have to take a different approach.