Db2

Db2

Where DBAs and data experts come together to stop operating and start innovating. Connect, share, and shape the AI era with us.


#Data


#Data
#Databases
#Operatingsystems
#Db2
#Databasesolutions
 View Only
  • 1.  Rounding Up in Summary Compute

    Posted 09/16/20 11:57 AM

    I need the result of a summary compute equation to round up, like the ROUNDUP formula in Excel. I can't find that formula in WebQuery. Is there one?






    #Db2
    #Support
    #SupportMigration


  • 2.  RE: Rounding Up in Summary Compute

    Posted 01/15/21 11:52 PM

    Assuming you are trying to do a round up of SUM of an Amount field:

    IF SUM.Amount GT 0 AND SUM.Amount NE INT(SUM.Amount) THEN INT(SUM.Amount + 1) ELSE INT(SUM.Amount)

    In words: if the number is greater than 0 and is not an integer then add 1 and drop decimals, else just drop decimals.

    1.2 -> 2

    -2.3 -> -2

    3 -> 3






    #Db2
    #Support
    #SupportMigration


  • 3.  RE: Rounding Up in Summary Compute

    Posted 01/28/22 05:49 PM

    Hi Dave,

    This functionality is available in the latest group PTF level of Web Query V2R3M0 in the Designer tool. You can right click a field, choose Add Calculation, click the FX button, then find the ROUND function under the Numeric category.






    #Db2
    #Support
    #SupportMigration