'like' operator question

D

djc

I am confused about some query result differences concerning 'like' and '='.
I think I know whats going on but I really want a confirmation from someone
with more experience than myself.

1) Should wild card characters work when using '=' ? eg. field1 = 'smith*' I
have found that they only seemed to work when using 'like'?? And I am aware
that 'like' is case insensitive and '=' is... so you can exclude that.

2) Once you limit results with criteria on a field such as, field1 Not Like
'smith*', should rows be returned where field1 is NULL? I thought they would
becuase NULL is Not Like 'smith*' although I have found that not to be the
case... 2b) why is that?

please enlighten me.
 
D

djc

Thank you. I got it now.

Allen Browne said:
Wildcards work only with Like.
Null values don't match any criteria.

More info on the Nulls issue in article:
The Query Lost My Records!
at:
http://allenbrowne.com/casu-02.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

'smith*'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top