I'm trying to build a SQL request that would search say for all companies. Each companies have many products. I know I could do a join but then, I have to loop trying to find when I'm changing record and moreover, my application need a comma separated list to work.
What I tried is :
select companyName, (Select ProductName FROM Product) as Products FROM Company
but I knew that it would not work......
Is there an aggregate function that allow to create comma separated lists in a field (I can't use stored procedures)
Thx a lot!
What I tried is :
select companyName, (Select ProductName FROM Product) as Products FROM Company
but I knew that it would not work......
Is there an aggregate function that allow to create comma separated lists in a field (I can't use stored procedures)
Thx a lot!