About 270,000 results
Open links in new tab
  1. What is the use of a cursor in SQL Server? - Stack Overflow

    Sep 25, 2018 · Cursor might used for retrieving data row by row basis.its act like a looping statement (ie while or for loop). To use cursors in SQL procedures, you need to do the …

  2. Using a cursor with dynamic SQL in a stored procedure

    A cursor will only accept a select statement, so if the SQL really needs to be dynamic make the declare cursor part of the statement you are executing. For the below to work your server will …

  3. How to use cursor within cursor in SQL Server? - Stack Overflow

    Jan 18, 2017 · I have the following query, I want use a nested cursor in my query. How to do this, because it's not running and I am new to SQL Server. Please help me CHECK TABLE …

  4. sql - Cursor inside cursor - Stack Overflow

    One more question: what version of sql server, because that will determine what we can use for creating the row numbers to replace your @counter in the inner cursor.

  5. sql - How to use cursor to update record - Stack Overflow

    Dec 28, 2011 · i am using below query to update my all records but it starts update from second row how can i modify it to do changes from 1'st row ? i am using mssql 2008 i think i can not …

  6. Get Multiple Values in SQL Server Cursor - Stack Overflow

    93 I have a cursor containing several columns from the row it brings back that I would like to process at once. I notice most of the examples I've seeing on how to use cursors show them …

  7. sql - Using a cursor with a CTE - Stack Overflow

    Jan 30, 2013 · I need a cursor for the below query so I can loop through to fetch/update/insert some other data. Can somebody help me with this? DECLARE @FROMDATE DATETIME …

  8. sql server - How do I select multiple columns in a cursor ... - Stack ...

    Apr 12, 2022 · You select the actual columns in the query that defines the cursor, You then fetch those values into variables. There is an example in the documentation. Your FETCH is correct …

  9. t sql - SQL Server - Cursor - Stack Overflow

    Jan 20, 2012 · SQL Server - Cursor Asked 13 years, 10 months ago Modified 3 years, 9 months ago Viewed 17k times

  10. sql server - If-Else Condition inside cursor - Stack Overflow

    Mar 13, 2017 · My Current SQL Syntax is something like Declare CursorName CURSOR FOR Select Query Now the select query would contain an If-Else Condition. If @Parameter1 is …