COMPUTE Clause

  • I have a compute clauses like this one:

    SELECT type, price, advance

    FROM titles

    ORDER BY type

    COMPUTE SUM(price), SUM(advance)

    The result is :

    type price advance

    ------------ --------------------- ---------------------

    business 19.9900 5000.0000

    business 11.9500 5000.0000

    business 2.9900 10125.0000

    .

    .

    .

    trad_cook 20.9500 7000.0000

    trad_cook 11.9500 4000.0000

    trad_cook 14.9900 8000.0000

    UNDECIDED NULL NULL

    sum

    ===================

    236.2600

    sum

    ===================

    95400.0000

    I want to use an alias on SUM.Is this possible?

    Do I have to use a temp table ?

    Thanks!

    Sica

    Edited by - sica on 11/03/2001 06:47:15 AM

  • no alias allowed.

    yes you need a temp table

    avoid this. Compute the sum yourself.

    Steve Jones

    steve@dkranch.net

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

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