You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a selectable stored procedure that inserts records into various tables, and then returns some fields. The records returned are based on what was inserted so there can be 1 to N records returned. In some cases in my executable code I need this returned data, and in other areas I do not. Therefore, the procedure was implemented as 'SELECT * FROM STORED_PROC(PARAMS)' in some places, and as 'EXECUTE PROCEDURE STORED_PROC(PARAMS)' in other places.
After debugging an issue recently I found that the when the EXECUTE PROCEDURE syntax was used Firebird was not processing all rows in the selectable procedure. As a result only a couple of records were being inserted by the procedure. I changed this to a SELECT syntax, and added an ORDER BY clause in order to force Firebird to process all rows. This took care of my issue.
I'm under the (possibly mistaken) impression that EXECUTE PROCEDURE should simply run until the procedure is done and not have a limitation on fetched records.
The text was updated successfully, but these errors were encountered:
Submitted by: Paul Gardner (cantak)
I have a selectable stored procedure that inserts records into various tables, and then returns some fields. The records returned are based on what was inserted so there can be 1 to N records returned. In some cases in my executable code I need this returned data, and in other areas I do not. Therefore, the procedure was implemented as 'SELECT * FROM STORED_PROC(PARAMS)' in some places, and as 'EXECUTE PROCEDURE STORED_PROC(PARAMS)' in other places.
After debugging an issue recently I found that the when the EXECUTE PROCEDURE syntax was used Firebird was not processing all rows in the selectable procedure. As a result only a couple of records were being inserted by the procedure. I changed this to a SELECT syntax, and added an ORDER BY clause in order to force Firebird to process all rows. This took care of my issue.
I'm under the (possibly mistaken) impression that EXECUTE PROCEDURE should simply run until the procedure is done and not have a limitation on fetched records.
The text was updated successfully, but these errors were encountered: