Problem dynamic cursor -
08-25-2009
, 11:59 AM
The next script is part of a procedure
declare cursorX dynamic scroll cursor for select distinct tmp.variablex
from dba.TABLE as tmp
conditions
open cursorX
fetch next cursorX into @tmpvarX
while(@@sqlstatus = 0)
begin
PROCESS
fetch next cursorX into @tmpvarX
end
close cursorX
and the problem is if I repeat three times this code with the same data,
procedure fails (it ends) and no error register.
what can it happend??
some clue to solve this?
Regards |