I have the following query in SQL SERVER:
Select Column1, Column2, Column3
FROM DBO.DATA
as a result the following:
COLUMN1 COLUMN2 COLUMN3
A Q P
B NULL O
NULL R L
C T G
I want to get all the records that have null in any of their columns and in another query I want to get the records that have null in none of the columns
Those that are not null in any column:
To obtain those that have a NULL value, you just have to use the IS NULL operator.
If what you want is some kind of "flag" for nulls, the answer would be something like this:
Indicate which ones have null in any of their columns
I think the other case can be easily derived from this one.