Why does this proc need to execute twice to run?!?

  • 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?

  • Can you post the code of the procs ?

     


    * Noel

  • Do you call SP from BizTalk?

    _____________
    Code for TallyGenerator

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply