Results 1 to 4 of 4

Thread: Cursors

  1. #1
    Join Date
    Apr 2004
    Location
    Melbourne
    Posts
    144

    Unanswered: Cursors

    In what situations would you use a cursor over a t-SQL update/select statement

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Almost never.

    I happen to be writing something about this at the moment. It is not done but you can have a look at the beginings of a draft here. I am afraid I have lost the felicity of phrase I had in my school boy days.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jan 2004
    Location
    In a large office with bad lighting
    Posts
    1,040
    When it absolutely, positively is the one and only way to accomplish the task.

    -- This is all just a Figment of my Imagination --

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I like Tom's answer.

    Generally, this occurs in conjunction with the need to use dynamic sql, often involving the querying of system objects or of objects across multiple databases.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •