Hi All,
first i want to perform a check on column whether if its null or not null. Then i want to check the next column for not null and null condition and then concatenate those values. How I should go about doing this. Right now I'm using CASE but I cannot seem to concatenate the output.
Something like this:
SELECT 'case_one' =
CASE WHEN col_one IS NOT NULL THEN col_one ELSE 'column one is null' +','
when col_two is not null then col_two
else 'column two is null'
end
FROM TABLE_NAME
The output I want is: col_one_value,col_one,col_two_value,col_two
Thanks!