Home Forums SQL Server 2005 T-SQL (SS2K5) Can a CURSOR be populated by firing a stored procedure? RE: Can a CURSOR be populated by firing a stored procedure?

  • sure hope we can help, it's honestly very satisfying to help someone eliminate a cursor when possible.

    ok, you've got a cursor, and it's doing something...SELECTING and matching with your WHERE criteria:

    ...WHERE MatterTask.Label = MatterContact

    in that situation, say you found three matching rows, you have logic that decides which row is the "right" row, or are you using this as an investigation tool?

    if you have some sort of specific logic in place, then you can probably change it to a set based operation.

    post your cursor if you can, and let us take a peek at it.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!