Got more questions? Find advice on: ASP | XML | Regular Expressions | Windows
in Search
Welcome to SqlAdvice Sign in | Join | Help

Browse by Tags

All Tags » SQL » Cursors
  • Sql Server Cursor Template

    This is a template that I have been using in SQL server for when I do have to write cursors.  Notice that there is only one fetch statement in there which is much slicker than the typical method of initially doing a fetch, with a while condition of while (@@fetch_status <> 0) and then another fetch in the while loop.  This ...
    Posted to Gregg Stark on SQL Server (Weblog) by gstark on July 18, 2007