Home Forums SQL Server 2005 T-SQL (SS2K5) Cursor.. cmds don’t seem to update until everything has finished RE: Cursor.. cmds don’t seem to update until everything has finished

  • Try using this instead of print, which is buffered:

    raiserror ('My Print Statement', 10,1) with nowait

    Your inserts may be uncommitted until the cursor loop has completed, in which case you could still see some data using the NOLOCK query hint.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden