About 72,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 write a cursor inside a stored procedure in SQL Server 2008

    Nov 22, 2012 · I want to write a cursor inside a stored procedure which loops over couponuse table and sees how many rows are there for one coupon and fill that number in NoofUses field …

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

    Get Multiple Values in SQL Server Cursor Asked 14 years, 10 months ago Modified 3 years, 11 months ago Viewed 157k times

  5. Dynamic SQL and cursor iteration in Snowflake - Stack Overflow

    Jul 8, 2024 · I've been sitting all weekend, trying to figure out the implementation of cursor iterations in Snowflake procedure blocks. The goal is to create a dynamic procedure that when …

  6. 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 …

  7. cursor for loop & dynamic SQL - Snowflake - Stack Overflow

    Aug 18, 2022 · I'm attempting to write a procedure that takes in a list of tables and date_column to create some row_counts by calendar dates for reconciliation purposes. SELECT t.* FROM ( …

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

    Jan 20, 2012 · Why are you using a cursors instead of a normal join, when a normal join would be so much faster?

  9. Can I use sql recursive in sql cursor? - Stack Overflow

    Mar 27, 2019 · 1 I'm writing a procedure which want to excecute the function recursively in cursor by using mssql. The function ParseJson in the following code is refer to How to parse JSON …

  10. sql - order by clause in cursor - Stack Overflow

    Apr 29, 2010 · How can I order data in a cursor? Can we use the order by clause? Because I need to sort the data first.