I am trying to insert into a table B from a query A that has 5 records using a generator based on the primary ID of Table B, lets call it GEN_B so they don't repeat IDs in tableB.
TableB has (ID, nameB, lastnameB). Query A (5 records) is the select query here:
Insert Into TableB (ID, nameB, lastnameB)
SELECT
GEN_ID(GEN_B,1), Name, LastNAme
FROM
Table123
left join .....
left join.....
where...
Why do I only see one record being inserted into TableB when I ran the "Insert into Select...", as opposed to the five records in the select query A? Is it because of the generator not updating the record inserted every time? Will I need to make a execute block for this? If so, any ideas how?
TableB
also involved in the source query? Please provide a minimal reproducible example which we can basically copy, paste and execute to reproduce. For your information, in Firebird 4.0, this would work.