select ContactId from dbo.ContactGroupReln where ContactGroupId=@ContactGroupId
through this query i want to get the comma separated list..Can any body help me pls..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Apr 17, 2013, 7:18 AM
DECLARE @listContactIdStr VARCHAR(MAX)
select @listContactIdStr = COALESCE(@listContactIdStr+',' ,'') +ContactId from dbo.ContactGroupReln where ContactGroupId=@ContactGroupId
SELECT @listContactIdStr
Please let me know, if it is not helping you.
Anurag SarkarPosted Apr 17, 2013, 3:57 AM