Search
 
SCRIPT & CODE EXAMPLE
 

SQL

loop through a table variable in TSQL without using a cursor

Declare @Id int
While (Select Count(*) From ATable Where Processed = 0) > 0
Begin
    Select Top 1 @Id = Id From ATable Where Processed = 0
    --Do some processing here
    Update ATable Set Processed = 1 Where Id = @Id 
End
Comment

PREVIOUS NEXT
Code Example
Sql :: tsql find the value and count of the item that occurs the most in a column 
Sql :: select place default lat long 
Sql :: union statement mysql 
Sql :: sql select column name like from multiple tables 
Sql :: jpa generationtype sequence mysql 
Sql :: like date sql server not working 
Sql :: inner join multiple conditions 
Sql :: MQL4 mql4 run ea on all symbols by adding to just one chart 
Sql :: sintax checker sql 
Sql :: we are intrested to work with your organization 
Sql :: sql server and spring boot api 
Sql :: select A from B join C as D using E where F match G order by H desc 
Sql :: count in spqarql 
Sql :: apache2 ssl error 
Sql :: oracle run_duration average 
Sql :: pass array parameter to stored procedure c# 
Sql :: what is in operator in sql 
Sql :: MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client 
Sql :: how to open database 
Sql :: connecting fastapi to mysql server 
Sql :: deletar banco de dados mysql 
Sql :: sqlFunction does not exist 
Csharp :: c# minimize form 
Csharp :: c# open web page in default browser 
Csharp :: unity right click on gameobject 
Csharp :: unity get all by tag 
Csharp :: Character Controller unity isGrounded is false 
Csharp :: json ignore property c# 
Csharp :: get absolute url c# 
Csharp :: dotnet get directory of executable 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =