Hi,
I have a stored procedure which I want to call from inside another stored procedure. I want to do this a number of times based on rows in a recordset. However, I don't know if this is possible. What I'd like to do is.....
for each ShopId in (select ShopId from Shops where ShopActive = 1)
set @shopid = shopid
exec sp_update_shop @shopid = shopid
loop
I know that is complete rubbish code - but can I do this?
cheers for any help you can give,
Sarah
I have a stored procedure which I want to call from inside another stored procedure. I want to do this a number of times based on rows in a recordset. However, I don't know if this is possible. What I'd like to do is.....
for each ShopId in (select ShopId from Shops where ShopActive = 1)
set @shopid = shopid
exec sp_update_shop @shopid = shopid
loop
I know that is complete rubbish code - but can I do this?
cheers for any help you can give,
Sarah