Subject Re: [ib-support] Re: error in trigger
Author Milan Babuskov
duilio_fos wrote:
>> 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 /*2*/
>> into
>>:n_doc,
>>:d_doc,
>>:serie,
>>:d_mag,
>>:cod_age,
>>:cod_dst;
>
>
>>I guess that primary key for table bl_hd is (y_mov, n_mov), is it?
>
>
> right
>
>
>>Have you checked how many rows this select returns?
>
>
> the "multiple rows..." error is raised and this means that 2 or more
> rows are returned.
>
> A further check shows that the error is raised _only when_ the row
> (2002,N) exists and the row (2003,N) must be inserted.

Hm, this IS very strange.

You do a select from a table and specify PK values in WHERE clause, and
you get more than 1 row... very strange, sounds like a bug.

Can you make something simpler to test if this is a bug? How many
triggers are on this table? Can you drop/recreate PK any try it again?

Milan Babuskov