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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL "like" operator does not work properly on x$ fixed views

Re: SQL "like" operator does not work properly on x$ fixed views

From: Richard Foote <Richard.Foote_at_oracle.com>
Date: Wed, 14 Aug 2002 21:42:48 +1000
Message-ID: <3D5A4238.E57B3DD7@oracle.com>


Hi Don,

Be careful saying Oracle bug too loudly, Big Brother is watching...

Actually, your query is working perfectly. The "_" is a special character that denotes a single wild character. So you are actually searching for a string with "IO" that does not start in the first position or end in the last.

What you need to specify is an escape character to override "_" default behavior ( .... like '%*_IO*_%' escape '*';)

Cheers

Richard

Don Burleson wrote:
>
> Can anyone explain this apparent SQL bug? The "like" filter seems to
> ignore the underscores when querying the x$ fixed tables:
>
> select ksppinm from x$ksppi where ksppinm like '%_io_%';
>
> KSPPINM
> ----------------------------------------------------------------
> sessions
> license_max_sessions
> license_sessions_warning
> _session_idle_bit_latches
> _enable_NUMA_optimization
> java_soft_sessionspace_limit
> java_max_sessionspace_size
> _trace_options
> _io_slaves_disabled
> dbwr_io_slaves
> _lgwr_io_slaves


Received on Wed Aug 14 2002 - 06:42:48 CDT

Original text of this message

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