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)
 Ignore case condition check

Author  Topic 

sunilsi
Starting Member

21 Posts

Posted - 2008-12-29 : 05:37:31
Friends,

I need to sort out names with ignorecase with wild card matching...something like below query

select * from Employee where employeeName not in('%Gerald%', '%Paproci%', '%Senthil%') or employeeName is null;

any help on this?

Linus

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-29 : 05:40:45
are you using case sensitive collation? by default,most collations are case insensitive so the above should work. whats the problem you're facing?
Go to Top of Page

sunilsi
Starting Member

21 Posts

Posted - 2008-12-29 : 05:47:58
it lists all names even that i wish to discard... itz not considering the NOT IN check with wildcard...
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-29 : 05:54:17
for wildcard searches you need like not in

select * from Employee
where (employeeName not like '%Gerald%'
and employeeName not like '%Paproci%'
and employeeName not like '%Senthil%')
or employeeName is null;
Go to Top of Page
   

- Advertisement -