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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-03-01 : 08:47:56
|
| Srinivasan Rajesh writes "Assume i have a table that queries the list of serial # froma tableFor a given xPartId Select SerialList from Serials where Part_Id = xPartIdThis will give a list of rows with singl column.I need a requeirment to append all columns in the rowsto be merged down with a seperator without the usage of cursorsin this queryThat is we must first merge rows into columns as in case of GetRows in Access and we must be able to merge the single rowof multiple coulumns into a single column.If you know any simple methods please let me know ASAP Thanx Rajesh" |
|
|
graz
Chief SQLTeam Crack Dealer
4149 Posts |
|
|
rajeessh
Starting Member
1 Post |
Posted - 2002-03-03 : 00:47:09
|
| I have got a solution for this using the logic inb the query belowdeclare @varlist nvarchar(4000)select @varlist = isnull(@varlist + ',','') + convert(nvarchar,s022002) from s022 where s022001 = 5465select @varlistThis will merge rows with commasThanx for all whoi turned up |
 |
|
|
|
|
|