tsql join multiple record in one string
Select CountryName from Application.Countries
Declare @val Varchar(MAX);
Select @val = COALESCE(@val + ', ' + CountryName, CountryName)
From Application.Countries Select @val;
tsql join multiple record in one string
Select CountryName from Application.Countries
Declare @val Varchar(MAX);
Select @val = COALESCE(@val + ', ' + CountryName, CountryName)
From Application.Countries Select @val;
tsql join multiple record in one string
-- Concatenates results into one single varchar with separator
SELECT LISTAGG(column_name, ',') WITHIN GROUP (ORDER BY column_name)
FROM YOUR_TABLE;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us