CodingIsFun
Programmer
Hi all experts,
I am trying to concatenate strings within the group by statement:
select product,name
from product
group by product,name
normally this particular case would list all the unique product and name combinations
I would like to concatenate the name part of this:
lets say here are my records:
product1, name1
product1, name2
product1, name3
product2, name4
product2, name5
result set I would like:
product1, name1 + name2 + name3
product2, name4 + name5
in this particular case product and name fields are varchars..
I know I can build a user defined function to concatenate a variable then return that, but I would prefer to use direct SQL. Is this possible..
Thanks in advance..
I am trying to concatenate strings within the group by statement:
select product,name
from product
group by product,name
normally this particular case would list all the unique product and name combinations
I would like to concatenate the name part of this:
lets say here are my records:
product1, name1
product1, name2
product1, name3
product2, name4
product2, name5
result set I would like:
product1, name1 + name2 + name3
product2, name4 + name5
in this particular case product and name fields are varchars..
I know I can build a user defined function to concatenate a variable then return that, but I would prefer to use direct SQL. Is this possible..
Thanks in advance..