Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting with nulls
Message
From
13/08/2013 14:17:57
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 6.5 and older
Application:
Web
Miscellaneous
Thread ID:
01580404
Message ID:
01580409
Views:
31
>>Hi All -
>>
>>I have this query defined.
>>
select * from TIP_Ledger where FundType='RTA' and isnull(checknumber,'')=''
>>
>>Interestingly, it produces the records specified and also those where checknumber is blank but not null. This is good but a surprise to me. I was wondering if it can be relied upon or is it just a quirk.
>>
>>Thanks for your shared knowledge.
>
>Of course you will get blank checknumbers too.
>The whole point if ISNULL() function is to convert NULLs to something that isn't null.
>if you want to get ONLY NULLs:
>
>select * from TIP_Ledger where FundType='RTA' and checknumber IS NULL
>
Thanks Borislav, I just wanted to make sure.
Previous
Reply
Map
View

Click here to load this message in the networking platform