Select Id_ as Id
Into #Temp
From your_table
where that = 'blabla' and this = 'something something dark side'
Declare @Id int
-- WHILE
While (Select Count(*) From #Temp) > 0
Begin
Select Top 1 @Id = Id From #Temp
-- Do some processing here
-- OK
Delete #Temp Where Id = @Id
End
No hay comentarios:
Publicar un comentario