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 -> cast function to integer

cast function to integer

From: Stephen <stephen_tx_at_my-deja.com>
Date: Thu, 07 Dec 2000 18:21:45 GMT
Message-ID: <90okfg$pur$1@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 Thu Dec 07 2000 - 12:21:45 CST

Original text of this message

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