flemingmike Posted October 5, 2010 Share Posted October 5, 2010 hello, so when i use like 'a%' it gives me all names stating with a when i use not like 'a%', it gives me all names that dont start with a how would i use not like so it would show me all names that dont start with a, b or c? Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted October 5, 2010 Share Posted October 5, 2010 WHERE field NOT LIKE 'a%' OR field NOT LIKE 'b%' OR field NOT LIKE 'c%' Quote Link to comment Share on other sites More sharing options...
Psycho Posted October 5, 2010 Share Posted October 5, 2010 WHERE field NOT LIKE 'a%' OR field NOT LIKE 'b%' OR field NOT LIKE 'c%' Not quite! That query would match ALL records in the table because it is using OR. Change the OR's to AND's to get the results you are looking for. Quote Link to comment Share on other sites More sharing options...
flemingmike Posted October 5, 2010 Author Share Posted October 5, 2010 perfect. thanks Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted October 5, 2010 Share Posted October 5, 2010 Doh! You know what I meant Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.