Home Forums SQL Server 2008 SQL Server 2008 - General Concatenation of strings with condition check,,, RE: Concatenation of strings with condition check,,,
Minnu
SSCertifiable
Points: 6451
More actions
December 3, 2012 at 7:17 am
#1564872
Hi Team,
BEGIN
SELECT RTRIM(
+ISNULL(Col_Name,'')+' : '
+ISNULL(+CAST(ColB AS VARCHAR(10))+' ','')
+ISNULL(' ColC :'+CAST(ColC AS VARCHAR(10))+' ','')
) FROM table_name
END
--
if ColB is NULL then ColC should not append .
Please help....