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: Verifying a variable only contains letters and not punctuation...

Re: Verifying a variable only contains letters and not punctuation...

From: Mike Madland <mikemad_at_asymetrix.com>
Date: 1997/10/24
Message-ID: <01bce0b1$3946b660$c9c5eec7@mikemad>#1/1

Try using the TRANSLATE function to strip out punction and then compare the results to your initial varable:

TRANSLATE(istring, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 `~!@#$%^&*()_+=-|}{[]\;:,./?><"''',
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')

-- 
Mike Madland
Asymetrix Learning Systems, Inc.

Bryan J. Gentile <bgentile_at_bdsinc.com> wrote in article
<344FA528.9AA90979_at_bdsinc.com>...

> Is there a way in PL/SQL to check for all punctuation marks such as
> commas, periods, etc. I will not know what the punctuation mark will be
> therefore, I cannot really use the REPLACE(variable, ',', '') function.
> I would rather use something more reliable. Is there something that
> PL/SQL has to do this?
>
> Also, if I wanted to check that a variable of type NUMBER was only
> numbers, how could I do that?
>
> --
> ************************************
> Bryan J. Gentile
> Consultant
> Business Data Services, Inc.
> Glastonbury, CT 06033
> Phone: (860)633-3693 (ext. 3025)
> Vmail: (ext. 6030)
> ************************************
>
>
>
Received on Fri Oct 24 1997 - 00:00:00 CDT

Original text of this message

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