I have a table that I need to UNION with another one and doing so I need to convert datetime value to true or false regarding on fact the value is or is not NULL.
Little example would be helpful:
ID | Value I have | Value I need |
---+--------------+--------------+
1| 2018-05-02| True|
2| 2018-05-03| True|
3| NULL| False|
Please, is there any way to do it within SELECT clause? I tried IIF or ISNULL functions but they don't work the way I need.
CASE WHEN YourColumn IS NULL THEN 'False' ELSE 'True' ENDIIF:IIF(YourColumn IS NULL, 'False','True')IS NULLand not getting the results you are expecting it could be a data problem.