L44 SQL-Developer-Lecture-23-1
L44 SQL-Developer-Lecture-23-1
Please make a note that COALESCE returns the first NOT NULL value
from the argument list we pass.
Intellipaat Software Solutions Pvt. Ltd.
.
Option 2: This is the smart but not the best way; though I have seen similar
code many times.
DECLARE @listStr VARCHAR(MAX)
SET @listStr = ''
SELECT @listStr = @listStr + NumberCols + ','
FROM #NumberTable
SELECT SUBSTRING(@listStr , 1, LEN(@listStr)-1)