Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Use like clause more then once
Jeremy Smith wrote:
> Currently 9i, will be moving to 10g this year. I tried joining the
> tables and doing to like statements, but it would give back zero
> records.
>
> SELECT distinct srv.SERVER_ID,srv.SERVER_NAME,srv
> FROM serverdb.servers srv inner join services svc on srv.SERVER_ID =
> svc.SERVER_ID
> WHERE (svc_display_name LIKE '%Microsoft Exchange%' and
> svc_display_name LIKE '%TSM%') and
> status_id = 1
>
>
> If I did only one like at a time it should have around 200 records
> returned. So I assume that oracle doesn't like 2 or more like
> staments in the same where statement.
You seem to be confusing AND and OR.
svc_display_name LIKE '%Microsoft Exchange%' is highly unlikely to also meet this test svc_display_name LIKE '%TSM%'
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Tue May 29 2007 - 16:28:44 CDT
![]() |
![]() |