Subject Re: Debugging Stored Procedures
Author Adam
--- In firebird-support@yahoogroups.com, "robertgilland"
<robert_gilland@...> wrote:
>
> Your right the problem is in the insert trigger.
> however now debugging the trigger becomes even more impossible.
>

I don't see why it is impossible. Divide and conquer by commenting out
your trigger then returning one line at a time if you have to.

The problem is quite simple. You are asking Firebird to run a query
and return the result into some variable, however the query you run
happens to be multiple records.

You are looking for a select statement in the form

select .... into .....

that is not inside a for loop that is returning more than one value.

A slightly more complex query with the same problem is:

select foo, (select bar from MyTableWithTwoRecords)
from anothertable

It should not be that hard to find.

Adam