| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL..
In article <01bc074a$fa13b0a0$6303fe0a_at_ppp.ncs.com.sg>, sfong_at_letterbox.com
says...
>
>Why no rows selected when I have this statement?
>
>select desc, code from table_a where name = 'ABC'
>and code like '3%' and code like '7%' ;
>
>Please reply.
>
>Thanks
>
>Stella
>
I think you need to change it to something like this:
>select desc, code from table_a where name = 'ABC'
>and (code like '3%' or code like '7%') ;
I don't think your example would ever return a row because the conditions 'code like 3%' and 'code like 7%' would ever be both true at the same time.
Please correct me if I am wrong.
Brett Cunningham
zgeist_at_ee.net
Received on Sun Jan 26 1997 - 00:00:00 CST
![]() |
![]() |