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 |
|
niravg
Starting Member
17 Posts |
Posted - 2005-01-03 : 13:17:39
|
| hi all:i have table table1(actId,conId,...)actId and conId is composite key..conId can have more than one actIde.g.table1(actId,conId) 1 1 2 1 3 1I want a select query that should return actId as a string like "1,2,3" for conId=1how do i do this?any help?thanks-Nii |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2005-01-03 : 13:19:05
|
Declare @actId varchar(1000)Select @actId = isnull(convert(varchar,actId)+',','') + convert(nvarchar,actId) From table1 Where conId = 1Corey |
 |
|
|
|
|
|