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 |
|
cbrinson
Starting Member
36 Posts |
Posted - 2002-04-10 : 18:14:07
|
| Given the following data set:Category Name0 Joe0 Nick0 Frank1 Fred1 Jim...Is it possible to select a comma separated list of Names as a column in the recordset? For example:0 Joe, Nick, Frank1 Fred, JimI have needed to do this pretty often. Now I just select the data using something like:SELECT category,nameORDER BY category ASCand then use Do While code on the ASP to display it the way I want to. But if there were a quick way of doing this with SQL that would be nice.Thanks,Chris |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
cbrinson
Starting Member
36 Posts |
Posted - 2002-04-10 : 22:24:12
|
| Thanks. I would imagine creating a temp table etc. would not be any faster than just looping through the array in asp and writing it to the page. That is the most difficult thing for me. Trying to figure out which solution would be faster while not spending what little time I have constantly testing different scenarios.Thanks,Chris |
 |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2002-04-10 : 22:27:22
|
| Chris,A good rule of thumb is that if it used for presentation then do it at the front end.HTHDavidMTomorrow is the same day as Today was the day before. |
 |
|
|
|
|
|