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

Home -> Community -> Usenet -> c.d.o.tools -> Re: cast function to integer

Re: cast function to integer

From: Thomas Devallé <thomas.devalle_at_skynet.be>
Date: Sun, 10 Dec 2000 12:44:59 +0100
Message-ID: <90vqee$t3i$1@news0.skynet.be>

Use the TO_NUMBER function.

"Stephen" <stephen_tx_at_my-deja.com> wrote in message news:90okfg$pur$1_at_nnrp1.deja.com...
> I have a simple question. I'm new to Oracle, and am trying to get
> Oracle 7.3 to change a two character text field (sample value '01') to
> an integer or tiny integer type (the value will never be higher than
> 99).
>
> How do I do this? What is the syntax for casting this field to an
> integer type? When I use a syntax such as "Cast(fld as integer)" I get
> a useless error message such as "missing right parenthesis". I can use
> the to_number function, but the data type is too large; I want an
> integer or tiny integer data type. When I nest the cast and to_number
> functions on the field, I get the same error message above.
>
> TIA for any insights!
>
> Stephen
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sun Dec 10 2000 - 05:44:59 CST

Original text of this message

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