Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    1

    Unanswered: numeric to float conversion problem

    HI all,
    I am working on sybase 11.9.2. I want to insert a value 2.56789 which is stored in a numeric(11,5) datatype column in table mst, to a column which is float in table xyz.
    When I perform the insert, the value changes to 2.5678899999999998.
    My requirement is to insert the exact value 2.56789 in xyz table. I don't want to change the column datatype in table xyz.

    Any Help !!!!!

  2. #2
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    Float columns are machine dependant, so if you didn't specify a precision when you created your table it could have more precision than you want.

    Why not ROUND the column when you SELECT/INSERT it?
    Thanks,

    Matt

Posting Permissions

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