sql server 2008 - cursor logging errors -


i having cursor loops through millions of rows. cursor executes stored proc accepts 3 parameters.

i need log errors , continue cursor instead of failure. guess,something try catch block.

not sure how that.can me? below code.(sql 2008r2)

select id,name,flag #student --100000000 rows   declare @id int, @name varchar(10), @flag int declare c cursor_local_forward select id, name, flag #student open c fetch c @id,@name,@flag while @@fetch_status = 0 begin      exec ('exec dbo.studentcall ' + @id + ',' +''''@name'''' + ',' + @flag) fetch c @id,@name,@flag     end deallocate c 


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -