I have a proc that inserts data into a temporary table by calling another stored procedure. It calls the other proc multiple times before it ends. However, the first time I try to execute the code, the call to the other proc fails. If I open a 2nd window in query analyzer and run just the other proc, it succeeds. If I then go back to the original window, the entire proc succeeds.
It appears something must be getting initialized, that can only be initialized by running the other proc by itself. I have no idea what that would be.
Can anyone shed light on what is happening here?