Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
For... Next for SQL
Message
 
 
To
13/07/2004 19:26:23
Ricardo Giron
Secrex Compañía de Seguros de Crédito
Lima, Peru
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00924012
Message ID:
00924018
Views:
16
Hi Ricardo,

You can use WHILE loop to emulate FOR loop.
DECLARE @i int, @count int, @step int
SELECT @i=1, @step=1, @count=5
WHILE @i <= @count  BEGIN
	PRINT @i
	SET @i = @i + @step
END
Than again, it all depends what you need it for. There maybe other ways achive what you want.

>
>How can I implement a For... Next in SQL?
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform