Subject Re: [ib-support] SUM + row_count
Author Helen Borrie
At 10:33 PM 22-11-02 +1100, I wrote:

>In a stored procedure:
>
>declare variable answer integer;
>declare variable rows_in_total integer;
>begin
> Select sum("Col_1"), count("col_1") into :answer, :rows_in_total
> where "col_2" = '2';
> ....

erk. Retry.

declare variable answer integer;
declare variable rows_in_total integer;
begin
Select sum("Col_1"), count("col_1")
from "table"
where "col_2" = '2'
into :answer, :rows_in_total ;
....



>In DSQL:
>
>Select sum("Col_1") as Total, count("col_1") AS answer

from "table"

> where "col_2" = '2';

heLen