Subject Re: [firebird-support] psql question with trigger
Author Ann W. Harrison
Dixon Epperson wrote:
>
> Is there a way to write the PSQL so that after it inserts the values
> it selects the new record number (the one in my table, not the one in
> the system tables) and returns it. I guess I'm asking how to select a
> field value based on the cursors current position. Is that possible?

You can't do it exactly that way. However, you can do it by getting a
new record number from a generator in the procedure, setting that value
into the record, inserting the record, and returning the value. You
should also change your trigger so it generates a new record number only
if the incoming record number is null.

Regards,


Ann