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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL Question

Re: SQL Question

From: Scott Canaan <srcdco_at_ritvax.isc.rit.edu>
Date: Fri, 03 Aug 2001 17:12:02 -0700
Message-ID: <F001.0035F42C.20010803064738@fatcity.com>

To add to this thread, you can make it only return the second record by changing the statement to:

select table_name from dba_tables
where table_name like 'EDL\_WORK\_%' escape '\';

This will force the _ character to be used as a literal.

Yosi Greenfield wrote:

> Darren,
>
> Just as the % character is a wildcard that matches any number of characters,
> the _ character is a wildcard that matches any single character. So it matches
> the S in WORKSTATION, and then the % sign matches TATION_LOCATION.
>
> hth,
>
> Yosi
>
> "Browett, Darren" wrote:
>
> > I have a simple query, but the results are somewhat puzzling
> >
> > select table_name from dba_tables where table_name like 'EDL_WORK_%'
> > and I received the following
> >
> > TABLE_NAME
> > -------------------------
> > EDL_WORKSTATION_LOCATION
> > EDL_WORK_AR_ENTITIES
> >
> > Why would I be receiving the first record (EDL_WORKSTATION) if I
> > try EDL_WORK_A% I get the correct result.
> >
> > Is there something about the _% combination ?
> >
> > To solve the problem I used the substr command as part of the where clause.
> >
> > Darren
> >
> > ----------------------------------------------------------------------------
> > -------------------------------------------------
> > Darren Browett P.Eng This message was
> > transmitted
> > Systems Admin/DBA using 100% recycled
> > electrons
> > Information and Communications Technology.
> > City of Coquitlam
> > P:(604) 927 - 3614
> > E:dbrowett_at_city.coquitlam.bc.ca
> > ----------------------------------------------------------------------------
> > -------------------------------------------------
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author: Browett, Darren
> > INET: dbrowett_at_city.coquitlam.bc.ca
> >
> > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > San Diego, California -- Public Internet access / Mailing Lists
> > --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
>
> --
> Thanks,
>
> Yosi
>
> ---------------------------------------------------------
> Yosi Greenfield
> Oracle Certified DBA
> ygreenfield_at_compuserve.com
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Yosi Greenfield
> INET: yosi_at_comhill.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

--
Scott Canaan (srcdco_at_rit.edu)
(716) 475-7886
"Life is like a sewer, what you get out of it depends on what you put into it" -
Tom Lehrer


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Scott Canaan
  INET: srcdco_at_ritvax.isc.rit.edu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Aug 03 2001 - 19:12:02 CDT

Original text of this message

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