Home » SQL & PL/SQL » SQL & PL/SQL » How to convert a string into numeric other than to_number (11)
How to convert a string into numeric other than to_number [message #573524] Sun, 30 December 2012 09:06 Go to next message
cplusplus1
Messages: 39
Registered: October 2012
Location: usa
Member
I have a column which has has all numeric values 3 digits to 7 digits in length but all in string format, I want to use seomthing other than to_number function.

Would like to use within the ETL tool, where to_number function isn't getting recognized.

select EMP_NO from employees;

Thank you very much for the helpful info.
Re: How to convert a string into numeric other than to_number [message #573525 is a reply to message #573524] Sun, 30 December 2012 09:14 Go to previous messageGo to next message
Littlefoot
Messages: 18821
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Reviewing your previous topics, it appears that your ETL tool (what is its name?) doesn't support SUBSTR, doesn't have TO_NUMBER, has problems with LIKE ... why don't you use some decent ETL tool, instead?

As of your question: Oracle is capable of performing implicit conversion between different datatypes, so - maybe you don't have to do anything.
Re: How to convert a string into numeric other than to_number [message #573534 is a reply to message #573524] Sun, 30 December 2012 09:43 Go to previous message
flyboy
Messages: 1750
Registered: November 2006
Senior Member
In Oracle you may also use CAST function, which is for 11gR2 documented here: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions023.htm#i1269136
select cast( '1234' as number(10) ) from dual;

but I doubt your ETL tool supports it.
Maybe it would be faster to explore what is "getting recognized" in that tool and stop trying to do anything else there.
Previous Topic: Extract Absent days from the month
Next Topic: Need a little help in deriving the logic
Goto Forum:
  


Current Time: Wed Apr 16 09:10:53 CDT 2014

Total time taken to generate the page: 0.06478 seconds