cory.bullard76
Ten Centuries
Points: 1232
More actions
March 11, 2016 at 9:27 pm
#325704
Curious on how to go about writing a multiple argument is null. For example....
If Field A is null then field B if field B is null then field C if field C is null then field D
Ed Wagner
SSC Guru
Points: 287026
March 12, 2016 at 7:34 am
#1864734
cory.bullard76 (3/11/2016)Curious on how to go about writing a multiple argument is null. For example....If Field A is null then field B if field B is null then field C if field C is null then field D
cory.bullard76 (3/11/2016)
It sounds like you're looking for COALESCE. It returns the first non-NULL value in the list. Example
SELECT COALESCE(A, B, C, D) your_column
FROM dbo.your_table;
Tally Tables - Performance PersonifiedString Splitting with True PerformanceBest practices on how to ask questions
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply