Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL - Filter for values without alphanumeric characters
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