Tambien hay posibilidades como un While...
Código:
While 1=1
begin
if not exists(select top 1 * from tabla where paso=1)
break
if a=b
begin
.....
.....
end
.......
.......
end
While exists(select top 1 * from tabla where paso=0)
begin
......
update tabla set paso=1 where ......
end
Bueno, son ejemplos, si quieres postea un poco de tu código he intentaremos ser más concretos.
Saludetes !!!