I have two string type fields "Source" and "Detail" with either of this having null value. Now I'm concatenating both the string fields separated by hyphen(-); but due to NULL value, the output is also NULL.
Refer image consisting of the actualoutput and outputexpected (highlighted yellow).
Can someone please suggest how to get the output expected?
Query I used:
SELECT Source, Detail, CONCAT(cast(Source as string), "-", cast(Detail as string)) AS actualoutput FROM tablename