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 |
|
lemondash
Posting Yak Master
159 Posts |
Posted - 2008-03-26 : 10:03:51
|
| Morning/Afternoon,Have a table called tblproducts and a second table called tblcolour.Now some of the products have many different colours, so when i run a select query and join the tables it returns many rows, with all coloums being the same apart from the colours field.What i would like to do is return the results so that colour field gets return in its own coloum but the values are serpated with a comma. The number of colours can be different depending on product.example:Product ColourPaint Red,Blue,YellowPens Gold, Pink, Yellow, PurpleBeen told that i can create a function to do and called when i need to run this select statement.Hope you can help.Regards Lee |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-03-26 : 13:23:15
|
| http://databases.aspfaq.com/general/how-do-i-concatenate-strings-from-a-column-into-a-single-row.html |
 |
|
|
|
|
|