Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 sql help

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2006-04-05 : 04:07:20
my sql is

select participantid,[Status] from participants where status not like 'A'

why would this sql above not return in it's results those with a status of null or blank??

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-05 : 04:15:21
As null values cant be compared with other values, you need to use

select participantid,[Status] from participants where (status not like 'A' or status is null)


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -