hola
tengo el siguiente problema al ejecutar un cursor:
Server: Msg 16929, Level 16, State 1, Line 21
The cursor is READ ONLY.
el cursor es el siguiene
DECLARE @doc varchar(255)
DECLARE @AUXdoc VARCHAR(255)
DECLARE CR CURSOR FOR
select doc
from tmp_cartera_rep order by doc
set @AUXdoc = '0'
OPEN CR
FETCH NEXT FROM CR
INTO @doc
WHILE @@fetch_status = 0
BEGIN
IF @AUXdoc = @doc
BEGIN
DELETE FROM tmp_cartera_rep where current
of CR
where Current of CR
END
set @AUXdoc = @doc
FETCH NEXT FROM CR
INTO @doc
END
CLOSE CR
DEALLOCATE CR
GO
gracias por su colaboracion
Leer las respuestas