Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2013
    Posts
    7

    Unanswered: Tables in cursors

    Hi All,

    Currently there is one table in my code and it is used by the cursor. As now i need to use the another table as well.
    According to requirement i check some condition if condition satisfies i need to use table A else table B in cursor.

    could you please advise me the better solution for this?

    Many thanks

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Best is: don't use a cursor.

  3. #3
    Join Date
    Jul 2013
    Posts
    7
    Could you please advise what else we can use here???

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Cursors are simple to write and almost infinitely flexible in terms of what they can do, but they are usually slow compared to set-oriented operations. I'd rewrite the process to use set-oriented operations instead of cursor-oriented operations. I've seen cases where the resulting set-oriented code runs in less than 1% of the time needed for the cursor-oriented version.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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