Subject | RE: [firebird-support] Re: SubSelect Question |
---|---|
Author | Alan McDonald |
Post date | 2003-11-11T01:54:26Z |
> A stored procedure.I wouldn't mind seeing a test result of this - I doubt that a subquery would
>
> create procedure GetAverages
> returns (
> AvPriceForPos numeric(18,2),
> AvVolPos numeric (18,2),
> AvVolNeg numeric (18,2)
> )
> as
> begin
> select
> avg(volume), avg(price) from abntradedata
> where volume > 0
> into :AvVolPos, :AvPriceForPos;
> select avg(volume) from abntradedata
> where volume < 0
> into :AvVolNeg
> end
>
> That's two queries but no subqueries to slow you down.
>
be any slower at all over this SP method
Alan