1
Answer

how to specify row in datatable

Photo of ahmed fahd

ahmed fahd

12y
1.1k
1
how to specify row in datatable and move between datatable rows
and can i give this row to datareader?

Answers (1)

0
Photo of Muralidharan Deenathayalan
NA 11.9k 1.5m 12y
Here is another simple of doing this.

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.
0
Photo of Anurag Sarkar
NA 2.4k 308k 12y
Please check this link and try the query out there http://www.c-sharpcorner.com/UploadFile/ff2f08/comma-separated-value-in-sql-query/