Results 1 to 2 of 2

Thread: Sort decimal data in an varchar2 field

  1. #1
    Join Date
    Jun 2003
    Location
    France
    Posts
    8

    Sort decimal data in an varchar2 field

    Hello,

    i have designed a table which contains varchar2 fields.

    one of these fields contains decimal data.

    i want to sort this table with this field using the caracteristics of the decimal data, not the string caracteristics because the sort order is not the same.

    i intend to use the function TO_NUMBER(a,b) but i do not know how to use the 'b' statement to set up decimal caracteristics.

    Could anybody help me ?

    Thanks in advance.

    best regards.

  2. #2
    Join Date
    Mar 2003
    Location
    Woking, UK
    Posts
    152
    try it without parameter b or
    for "b" put max value of "a".
    example
    SELECT To_Number('12.34567','99.99999') FROM dual;
    You Have To Be Happy With What You Have To Be Happy With (KC)

Posting Permissions

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