Cursor details

  • How we can see what cursor is doing as we can see for stored procedure by using "sp_helptext"

  • DBCC INPUTBUFFER

  • If you want to know howmany rows are processed by your cursor, query @@CURSOR_ROWS after you've opened the cursor. See the documentation for some pitfalls if you use this variable.

    Wilfred
    The best things in life are the simple things

  • Guys , i want to know the text of the cursor not number of rows affected ...

  • :hehe: I assume, you can't dig into the SQL code to see the cursordefinition ?

    In that case, watch the process with profiler.

    Otherwise, scan you code for phrases like

    declare {name} cursor for

    select {columnnames}

    from {tablename}

    where {whereclause}

    Wilfred
    The best things in life are the simple things

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply