Results 1 to 2 of 2

Thread: Conversion of String to Decimal

  1. #1
    Join Date
    Aug 2005
    Posts
    4

    Conversion of String to Decimal

    Hi Gurus,

    I need to convert the string value with a size of 11. The string value is preceded by a sign at the beginning. Now i have to populate this value to a other table with the datatype:
    number(9.2).

    the following are the string values in TAB1

    TAB1
    + 0.00
    - 2.00
    + 19.00

    Now i want to populate the TAB2 table with the following format

    TAB2
    +0.00
    -2.00
    +19.00

    Can anybody throw some light on this?

    Thanks in Advance

    -S

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You have to remove the blank space to insert as number

    select to_number(replace(TAB1,' ',''),999999999.99) from yourtable

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •