Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    1

    Unanswered: Number format conversion

    Hi

    I need to convert number from format 0 to 0.00. Can you let me know what is the function and example?.

    Thanks

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Can you explain the semantics that you want to have? Do you just want to show 2 trailing digits? If so, convert the number to a string and concatenate it with '.00'. Or maybe you want to convert your number to a DECIMAL value with a scale of 2? Or maybe you just want to do this: CASE WHEN number = 0 THEN '0.00' END.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Jul 2009
    Posts
    150
    You can use the function DECIMAL(x, p, 2) where p - number of digits in x.
    p > 2

    Thanks

Posting Permissions

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