Decimal Points

  • Hi Forumer's

    I have these query.

    I would like the result of AVG between the 2 dates to have 2 decimal places. kindly please take a look my query.

    Select

    DATEADD(MM, DATEDIFF(MM, 0, RETURNDATE),0) as USReturnMonth,

    CAST(AVG(DATEDIFF(Day,Returndate,AsiaReceiptdate)) as Decimal (10,2)) as AVGTAT, ---sample 1

    CAST(ROUND(AVG(DATEDIFF(Day,Returndate,AsiaReceiptdate)),2) as Decimal (10,2))as AVGTAT2 --sample2

    From #Data2

    Where supplierid in (45) --Returndate < '05/01/2012' and

    Group by

    DATEADD(MM, DATEDIFF(MM, 0, RETURNDATE),0)

    order by

    DATEADD(MM, DATEDIFF(MM, 0, RETURNDATE),0)

    Thanks

    JOV

  • villanueva.jonel (5/24/2012)


    I would like the result of AVG between the 2 dates to have 2 decimal places. kindly please take a look my query.

    Looked at the query. Did you have a question?

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

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