Hi,
I have one table
Id Email
1 aaa@gmail.com
2 bb@gmail.com
i have one button after clicking of that button i need to fetch all emails from database and display it with comma separated values
Ex o/p:aaa@gmail.com,bb@gmail.com
Hi mahesh213,
Use query like below and implement in your code to dispaly the record.
DECLARE @CSV VARCHAR(MAX) SELECT @CSV = COALESCE(@CSV + ', ', '') + FirstName from Employees SELECT @CSV AS Result
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.