dbo.borra_monitoreos_sit_1

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE OR ALTER PROCEDURE dbo.borra_monitoreos_sit_1

AS
BEGIN
    SET NOCOUNT ON;
 declare @r_id int, @r_tabla int, @situacion int 
    DECLARE cec CURSOR
   FOR
    select top 10 id_monitoreo, id_tabla
     from monitoreos_resultados 
     where
      fecha = '2017-10-19 00:00:00' 
     and tabla = 'cendeu_temp'
   

   OPEN cec 
    FETCH next from cec INTO  @r_id, @r_tabla
   WHILE (@@FETCH_STATUS <> -1 )
   BEGIN
       set @situacion = (select CONVERT(int,situacion)
         from cendeu_temp
         where id_cendeu = @r_tabla)
       select @situacion
    FETCH next from cec INTO @r_id, @r_tabla
   END
   CLOSE cec
   DEALLOCATE cec 
END  
   

GO

Used By

No items found