Got a Compute Question

  • Got a question for you old timers,, oops; sorry, i mean more experienced sqler's

     

     When would be the proper implemation to use the ....compute ?

     

    FROM BOOKS ONLINE::

            USE pubs

    GO

    -- Row aggregates

    SELECT type, price, advance

    FROM titles

    WHERE type LIKE '%cook'

    ORDER BY type

    COMPUTE SUM(price), SUM(advance) BY type

    Thanks,

    Erik....

    Dam again!

  • If you need detail data and aggregated data at the same time, you can use COMPUTE.

    COMPUTE generates multiple record sets. Your client side app need to have the capability to handle this.

     

  • Thanks..

    Dam again!

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

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