Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2004
    Posts
    74

    Unanswered: Formatting a float variable to 2 decimal places

    Hey,

    I am filling a temp table with various float variables and I need to format one particular column to 2 decimal places.

    Does anyone know the correct syntax to do this, and should it be done before filling the temp table or when I select what I needs from the temp table?

    Thanks

  2. #2
    Join Date
    Dec 2004
    Location
    California, USA
    Posts
    93

    Exclamation

    This should be done at the application level.
    Whoever imagines himself a favorite with God holds others in contempt. - Robert Green Ingersoll, lawyer and orator (1833-1899)

  3. #3
    Join Date
    Dec 2004
    Posts
    74
    Ok, I'll look into that
    Last edited by Spence23; 12-20-04 at 12:14.

  4. #4
    Join Date
    Jul 2002
    Posts
    2

    float is approximate

    If at all possible, use decimal (x,2) instead of float. Float is considered an approximate datatype and if you have lots of math/rounding it could introduce errors in your application.

Posting Permissions

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