Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: adding values to multiple columns

    SELECT drivernum,Sum(fuelchrg),Sum(tractorcost),Sum(CashAdvAmt),Sum(cashadvchrg),Sum(totamtdue),Sum(oilcost) ,

    Sum(fuelchrg)+Sum(tractorcost)+Sum(CashAdvAmt)+Sum(cashadvchrg)+Sum(totamtdue)+Sum(oilcost) as gTotal

    from fuelinvoice group by drivernum

    with rollup

    ROLLUP generates a result set showing aggregates for a hierarchy of values in the selected columns. VAlue of drivernum will be...

Viewing post 1 (of 1 total)