Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Using SUM in an sql
Sun, Jun 11 2006 11:52 PMPermanent Link

"Paul"
Hi All,

can anyone help me write an sql that will total a column for a number of
different payment types.

Say I have the following data :

CASH            50.00
CASH            75.00
CHEQ            20.00
CASH            30.00
CHEQ            90.00

I would like the resultant dataset

PayType         Total

CASH            155.00
CHEQ            110.00

How can I do this ?


Cheers,
Paul

Mon, Jun 12 2006 12:37 AMPermanent Link

"Paul"
Hi,

I found an example in the help file. It's working now.

Cheers,
Paul

"Paul" <paul@pacsoftware.com.au> wrote in message
news:AF76D494-6B49-4768-90E4-64E7509E461C@news.elevatesoft.com...
> Hi All,
>
> can anyone help me write an sql that will total a column for a number of
> different payment types.
>
> Say I have the following data :
>
> CASH            50.00
> CASH            75.00
> CHEQ            20.00
> CASH            30.00
> CHEQ            90.00
>
> I would like the resultant dataset
>
> PayType         Total
>
> CASH            155.00
> CHEQ            110.00
>
> How can I do this ?
>
>
> Cheers,
> Paul
>

Image