Separate Integer and decimal from a number datatype column [message #406040] |
Mon, 01 June 2009 22:23  |
sonu_2280
Messages: 3 Registered: June 2009 Location: USA
|
Junior Member |
|
|
Hi All,
I have a question on separating the integer and decimal part from a NUMBER(datatype) column. I have a column with NUMBER(datatype) say for example 34.56 in my table xx, I need to separate the integer and decimal part of it and write to 2 different columns(34 to one column and .56 to another column). Although this looks simple, I am not quite sure on how to do it. I tried instr(to_char)...converting them to Char etc..using combination of functions and commands..but data is so huge and it could be any number (say even 7877654.56 ). How do I do this , I also tried using regexp_substr commands, but I am not sure about this one too.
I am using oracle 9i. Could anyone please suggest a way to handle this??
Thanks so much for your help in advance!!!!
|
|
|
|
|
|
|
|
|
|