var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Looping in Stored Procedures
can we write loops in MSSql stored procedures ?
my aim is to do something like
select * from table
while < recordset is not blank >
is this possible in stored procedure or should i do this from my client
u can very well do this.
create procedure looping
declare @l int
or it can be a condition like
while exists (select * from table)
Loops In Sql Server
thanks for the information
but have one more qn
im SELECTing some rows from a table
and in the loop, i want to perform some operation on each selcted row
after performing the operations , will the loop moves to the next
for that u need to use cursors.
but use of cursors is not the recomended way of doing things in sql.
so if u could post what u r trying to do, some one out here will surely be help u out.