About 51 results
Open links in new tab
  1. Syntax of for-loop in SQL Server - Stack Overflow

    May 20, 2011 · SQL is a very different language compared to what you're used to. It's focused on what, not how. You tell SQL Server what results you want, and let it figure out how to produce the answer. …

  2. How do I loop through a set of records in SQL Server?

    224 How do I loop through a set of records from a select statement? Say I have a few records that I wish to loop through and do something with each record. Here's a primitive version of my select statement:

  3. In SQL Server, how to create while loop in select

    Nov 10, 2013 · In SQL Server, how to create while loop in select Asked 12 years, 3 months ago Modified 9 years, 6 months ago Viewed 285k times

  4. repeat loop in Sql? - Stack Overflow

    Oct 30, 2018 · The only iterative construct in plain standard SQL is a "Recursive CTE". Other than that, there isn't any other way. Now, if you are talking about about procedures and functions such as …

  5. Como fazer for loop em SQL SERVER? - Stack Overflow em Português

    Oct 26, 2016 · Como fazer for loop em SQL SERVER? Perguntada 9 anos, 4 meses atrás Modified 9 anos, 3 meses atrás Vista 61mil vezes

  6. T-SQL loop over query results - Stack Overflow

    Apr 11, 2024 · 98 I run a query select @id=table.id from table and I need to loop over the results so I can exec a store procedure for each row exec stored_proc @varName=@id,@otherVarName='test' …

  7. SQL Server FOR EACH Loop - Stack Overflow

    Jan 1, 2010 · SQL Server FOR EACH Loop Asked 13 years, 10 months ago Modified 6 years, 10 months ago Viewed 670k times

  8. sql server - Is there a way to loop through a table variable in TSQL ...

    declare @databases table ( DatabaseID int, Name varchar(15), Server varchar(15) ) -- insert a bunch rows into @databases Is declaring and using a cursor my only option if I wanted to iterate through …

  9. SQL Server batch delete using WHILE loop does not work

    Mar 21, 2013 · Be aware that after SQL 2012: "Using SET ROWCOUNT will not affect DELETE, INSERT, and UPDATE statements in a future release of SQL Server. Avoid using SET ROWCOUNT …

  10. sql - While Loop to Iterate through Databases - Stack Overflow

    I was wondering if someone could help me with creating a while loop to iterate through several databases to obtain data from one table from two columns. this is was I have done so far. nothing wo...