Round off the sacle of decimals in db2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gowtham83
    New Member
    • Jul 2010
    • 2

    Round off the sacle of decimals in db2

    Hi I have decimal value of (9,3) in my source table and want to insert it into a table where thje values can be only (9,2). How do you round off the last decimal point
    Ex: If I have 666666.666 i want the value as 666666.67. How do i do it?
  • ctp0102
    New Member
    • Aug 2010
    • 2

    #2
    There are two ways:

    target_column = round(source_co lumn,2)

    or

    target_column = source_column +0.005

    Comment

    Working...