Using the below query we can convert the rows to column sperated by a delimiter.
In the query I am using ';' as the delimiter and you can change the delimiter of your choice by replacing ';'.
Data from Table:
Query:
In the query I am using ';' as the delimiter and you can change the delimiter of your choice by replacing ';'.
Data from Table:
Use AdventureWorks2008R2 GO DECLARE @eMailList nvarchar(max) SELECT @eMailList = COALESCE(@eMailList + ';', '') + CAST(eMail AS nvarchar(max)) FROM Employees Select @eMailList as eMailList
Output of the above Query:
3 comments:
what if i have 2 colums
Wow, you seem to be very knowledgable about this kind of topics.`–’, https://royalcbd.com/cbd-legal-status/
Aivivu chuyên vé máy bay, tham khảo
săn vé máy bay giá rẻ đi Mỹ
vé máy bay từ new york về việt nam
chuyến bay từ đức về hà nội hôm nay
các chuyến bay từ nga về việt nam
giá vé máy bay từ anh về hà nội
chuyến bay từ Pairs về TpHCM
chuyến bay dành cho chuyên gia
Post a Comment