Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Use like clause more then once

Re: Use like clause more then once

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 30 May 2007 08:22:45 -0700
Message-ID: <1180538565.023852.247390@q66g2000hsg.googlegroups.com>


On May 30, 6:28 pm, Jeremy Smith <godto..._at_hotmail.com> wrote:
> Yes thanks stephen O'D,
>
> Most that are replying, think that I have an issue with using AND and
> OR. My services table does have records for a server having both
> EXCHANGE and TSM. But if I update the query to scan the services
> table once, by doing a join and doing the Like twice on the same
> column it gives back no rows. When there are around 106 servers that
> do have both services. So wasn't sure if this is a bug in Oracle or a
> better way to do the select statement to scan the servies table only
> once, since it has over 6 million records..
>
> Thanks for everyone's replies, still need help

I don't think you need any more help - we already gave you two solutions, one with GROUP BY and another with analytic function, which you can evaluate for performance and choose the one that suits you best. Just try either of them and witness that they return expected results.

Regards,

   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm)    http://www.dynamicpsp.com Received on Wed May 30 2007 - 10:22:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US