Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> cast function to integer
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
![]() |
![]() |