I have created a temp table that I am then dumping all the values from a view into at the start of a stored procedure.
INSERT INTO TG_ACTIVE_ACTIVITIES_TEMP_TB (SELECT * FROM TG_ACTIVE_ACTIVITIES_VW);
Further down the SP fails because it finds no data and sure enough the table is empty. This happens even if the SPs only job is to insert from the View to the Temp table and then exit.
I am at a loss. I thought committing would do the trick. I have tried loading the contents of the view into a for loop and inserting each row. I have tried defining each row to get and insert into rather than *.
The insert DOES work outside of the SP so long as it is followed by a commit.