Rounding results to 2 decimal places

  • I have the following query:

    SELECTAVG(Commission)

    FROM tbltardes

    WHERETrade_date

    BETWEEN '2009-01-01 00:00:00' and '2009-01-31 00:00:00'

    ANDCommission

    NOT LIKE '0'

    ANDITEMCODE

    Not in ('0000001','0000002')

    The result is 561.111315637622.

    How do I get the result to round UP to 2 decimal places

    i.e. the result would be 561.11

  • Look up the ROUND function in BOL.

    ROUND(number, 2) should do the job.

    -- Gianluca Sartori

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply