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

Home -> Community -> Usenet -> c.d.o.server -> Re: test a column value

Re: test a column value

From: Karsten Farrell <kfarrell_at_medimpact.com>
Date: Mon, 28 Oct 2002 23:54:49 GMT
Message-ID: <d7kv9.1802$sS3.114722840@newssvr13.news.prodigy.com>


ji wrote:
> Hi
>
> I guess I didn't make my question clear:
>
> I don't want to match particular characters or number, but to detect the
> column is containing characters or number.
>
> "Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message
> news:3DBD6890.CD7A60EC_at_exesolutions.com...
>

>>ji wrote:
>>
>>
>>>Hi:
>>>
>>>How can I test a column (datatype varchar2) value in Oracle 8.1.7, I
>>

> need to
>
>>>find out this column contains a string of numbers (1,2,3...)  or
>>

> characters
>
>>>(a,b,c ...) in any position.
>>>
>>>much appreciate
>>
>>Use the INSTR function.
>>
>>Daniel Morgan
>>

>
>
>

Don't know if this answers your question. Do a to_number(varchar2_field) and trap for ORA-01722 (invalid number). If your procedure throws this exception, you have an alphabetic or alphanumeric field; if it doesn't throw the exception, you have a purely numeric field. Received on Mon Oct 28 2002 - 17:54:49 CST

Original text of this message

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