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: SQL - Filter for values without alphanumeric characters

Re: SQL - Filter for values without alphanumeric characters

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 28 Jun 2006 06:46:44 -0700
Message-ID: <1151502404.330836.171740@i40g2000cwc.googlegroups.com>

Robert Wehofer wrote:
> Hello!
>
> I would like to execute following sql statement:
>
> SELECT MAX(Column1) FROM Table1
>
> and assign the result to an integer variable.
>
> The conversion will fail, if the maximum contains alphanumeric characters.
>
> Is there a possibility to set a WHERE clause to filter only those values not
> having alphanumeric characters?
>
> Regards,
> Robert

Robert, pull the SQL manual and look up the TRANSLATE and/or INSTR functions.

There are several ways to accomplish what you want using the char manipulation functions above potentially also using substr, rpad, lpad, trim (ltrim, rtrim), etc....

HTH -- Mark D Powell -- Received on Wed Jun 28 2006 - 08:46:44 CDT

Original text of this message

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