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

前端 未结 8 1711
悲哀的现实
悲哀的现实 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

    You have to use CASE

    SELECT CASE WHEN Field IS NOT NULL
        THEN 'something'
        ELSE 'something else'
    END
    

提交回复
热议问题