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: having a senior moment and can't fingure

Re: having a senior moment and can't fingure

From: Stephane Faroult <sfaroult_at_roughsea.com>
Date: Tue, 26 Oct 2004 18:12:04 +0200
Message-Id: <200410261612.i9QGC4aZ018003@webmail.nexlink.net>

 

Kathy,

   add

     and translate(field, '0123456789', '000000000') = '0000'

In fact, your 'between' condition can be considered redundant however I wouldkeep it if the column is indexed (... and of course the range scan improves speed over a full scan).

Regards,

Stephane Faroult

RoughSea Ltd
http://www.roughsea.com

On Tue, 26 Oct 2004 10:41 , 'Duret, Kathy' <kduret_at_starkinvestments.com> sent:

I am having a senior moment today .....

sI want to get only those varchar2 fields back with a length of 4 that are numeric

select field from table where length(field) = 4 and

between '0001' and '9999' - I used this but I get alpha characters back.

I know it is something simple but I am just going blank.

Kathy

This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
--

http://www.freelists.org/webpage/oracle-l[1]

Received on Tue Oct 26 2004 - 10:57:20 CDT

Original text of this message

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