Is there a opposite function to ISNULL in sql server? To do Is not null?

前端 未结 8 1695
悲哀的现实
悲哀的现实 2021-01-01 08:53

I have this code in my select statement

ISNULL(a.PolicySignedDateTime,aq.Amount) AS \'Signed Premium\',

But I want to see if \"a.PolicySign

8条回答
  •  死守一世寂寞
    2021-01-01 09:23

    It seems to me this would be an easy way to get the opposite.

    SELECT (1-ISNULL(field));

    Will give you 1 if NOT NULL and 0 if NULL instead of the 1 for NULL and 0 for NOT NULL

提交回复
热议问题