Subject Re: [firebird-support] Several SP parameters requested only
Author Alexandre Benson Smith
Adomas Urbanavicius wrote:

>I wonder if it is posible to know if user requested specified output in
>SP body; or Sp knows it automatically.
>Example :
> SP1
> returns A1 integer; A2 integer;
>begin ...
>< Getting A1> ~ lets say takes ~ 2 sec to calculate
>< Getting A2> ~ lets say takes ~ 3 sec to calculate
>And now, I am able to write selection : select A1 from SP1, select A2
>from SP1, select A1,A2 from SP1;
>Will SP time be allways ~ 5 sec, or maybe inside SP I can somehow find
>out is selected A1 and A2 or only A1/A2.?
>something like :
>if <A1 is requested> then
> < Getting A1>

Will can branch the execution inside the SP (to do not calculate what is
not necessary) if you pass an inout parameter saying what parameters you
will need.

you could use a Bitmap integer to represent the parameters you will
need, there is and UDF that performs bitwise operations.

see you !

Alexandre Benson Smith
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil