Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Experts plese help me..
Lars,
That's good to know. Because this column appears to be just a long winded description, I would bet that it isn't indexed. It also seems practical that the CP#xyy part prefixes the entire string in those cases, so using 'CP#%' would get them. We don't really know because the originator of this thread didn't give this information.
Paul Cluiss
Dallas, Texas
Lars Lerager wrote:
> "paul cluiss" <paul_cluiss_at_intervoice.com> wrote in message
> [CUT]
> >
> > If these assumptions are correct, I propose this SQL statement:
> >
> > select * from the_table where the_column like '%CP%';
> >
> [CUT]
>
> Consider this:
> If "the_coloumn" is an indexed coloumn you should avoid wildcards (%) in the
> start of the LIKE 'xxxx'-statement. These wildcards prevents Oracle from
> using the index. If possible - do like this:
>
> select * from the_table where the_column like 'CP%';
>
> Lars
Received on Fri Nov 19 1999 - 10:44:24 CST