Subject | Re: [ib-support] Stored Procedure error |
---|---|
Author | Nando Dessena |
Post date | 2001-03-27T13:00:17Z |
Arnaldo,
pagamenticliente, directly or indireclt, thus causing an endless loop.
Ciao
--
____
_/\/ando
> CREATE PROCEDURE DIFFERENZA_PAGAMENTO_CLIENTE (you are probably calling the stored procedure from a trigger on
> NORDINE INTEGER)
> AS
> declare variable totaleordine numeric( 18,2 );
> declare variable progressivo numeric( 18,2 );
> declare variable importo numeric( 18,2 );
> declare variable vmycode integer;
>
> begin
> /* find the total amount of the payment */
> select totale from ordiniclienti where mycode= :nordine
> into :totaleordine;
> progressivo = 0; /* reset progressive counter */
> /* sum the various import of the payment */
> for select mycode, importo from pagamenticliente where
> collordine = :nordine order by datapagamento
> into :vmycode, :importo do begin
> /* increment progressive counter */
> progressivo = :totaleordine - ( :progressivo + :importo ) ;
> /* write data on database */
> update pagamenticliente set differenza = :progressivo where mycode
> = :vmycode ; /**** here give me a stack error and lost the connection.
> end /* for ... */
> end
pagamenticliente, directly or indireclt, thus causing an endless loop.
Ciao
--
____
_/\/ando