#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    1
    Rep Power
    0

    Question Insert text in a specified format as number(x,y)


    Hi all,

    Im trying to insert a number specified by the format for ex. S999.99, but the original text is of the form S99999, is there any way i can insert the data which will store it in the DB with the datatype as Number(5,2), the decimal is not present in the supplied value(through PreparedStatement) but needs to be put while inserting into the DB.

    P.S.- 'S' in S999.99 signifies the sign(+/-).
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    Perhaps I am missing something; but why won't this work?
    Code:
      TO_NUMBER('S99999') / 100;
    Clive

IMN logo majestic logo threadwatch logo seochat tools logo