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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Anurag SarkarRank #1,049 · 1.8K reputationPosted Apr 16, 2013, 11:57 PM EDT
Posted Apr 17, 2013, 3:18 AM EDT
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.