Subject Re: [ib-support] Re: error in trigger
Author Milan Babuskov
duilio_fos wrote:
> a sum that returns multiple rows ?
>
> Are you kidding ?
>
> Please read carefully my original post then, if you want or can, come
> back with a more helpful answer.

I'm really sorry about that, didn't read carefully.

Now, on to the real problem:
> select /* 1 */
> n_doc,
> d_doc,
> serie,
> d_mag,
> cod_age,
> cod_dst
> from bl_hd
> where bl_hd.y_mov=bl_lt.y_mov and bl_hd.n_mov=bl_lt.n_mov
> into
> :n_doc,
> :d_doc,
> :serie,
> :d_mag,
> :cod_age,
> :cod_dst;

Instead of answers I have some questions:

I guess that primary key for table bl_hd is (y_mov, n_mov), is it?
Have you checked how many rows this select returns?

Milan.