Subject procedure question or multiple table keys
Author dleec45
I have a situation where I need to add several records to several
tables and want them to all have the same key. First of all I'm new
to Firebird15 and don't know how to do this but I found this examples
on the IBPhoenix home page that will return the genID and insert a
record using that value. Is this a common way to use the returned
value in other inserts so that the value of all necessary tables have
a common key?

DECLARE variable var_id integer;
BEGIN
execute procedure call_gen_id
returning_values :var_id;
insert into t1 (pkey, a_string)
values (:var_id, :in_string);
new_id = :var_id;
string_sent = :in_string;
SUSPEND;
END

Hope this is clear. Regards, Lee