Subject Re: [ib-support] error in trigger
Author Milan Babuskov
duilio_fos wrote:
> the enclosed trigger does not work as expected.
>
> At times, it causes a "multiple rows from singleton select" error.

That's because sometimes select returns only one row.

>
> I investigated the problem and found the culprit in the "select"
> starting at /* 1 */.

hm, it seems to me that the problem is here:

> select sum(q_c_acq+q_c_div-q_s_ven-q_s_div) from tb_cau1 where
> cod_cau=bl_lt.cod_cau into :sign;

this select might return mulitple rows, and then you get the error.

HTH

--

Milan Babuskov
http://fbexport.sourceforge.net