Subject | Re: [ib-support] SUM + row_count |
---|---|
Author | Helen Borrie |
Post date | 2002-11-22T11:49:32Z |
At 10:33 PM 22-11-02 +1100, I wrote:
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 a stored procedure:erk. Retry.
>
>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';
> ....
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:from "table"
>
>Select sum("Col_1") as Total, count("col_1") AS answer
> where "col_2" = '2';heLen