Subject RE: [ib-support] If statements in an SP
Author Bill Meaney
On second thought, you can not dynamically modify a query in a SP or trigger
like you are trying to do.

Bill Meaney

> begin
> for
> select C.CUSTID, C.COMPANY, C.ZIP, C.CUSTPROS,
> Z.ZIPCODE, Z.ZIPCITY, Z.ZIPSTATE
> from CUSTOMER C join ZIPCODE Z on Z.ZIPCODE = C.ZIP
> /* if :CORP <> '' then
> begin
> and C.CUSTPROS = :CORP
> suspend;
> end; */
> order by CUSTID
> into :CUSTID, :COMPANY, :ZIP, :CUSTPROS, :ZIPCODE, :ZIPCITY,
> ZIPSTATE
> do
> suspend;
>
> end
>
>