dbo.cargar_novedades_html

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

5
Name Data Type Length Description
@id int 4
@p_tabla varchar 20
@nro_cheque int 4
@html varchar -1
@yesterday date 3

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE OR ALTER PROCEDURE dbo.cargar_novedades_html
@id int,
@p_tabla varchar(20),
@nro_cheque int,
@html varchar(max),
@yesterday date = null

AS
BEGIN
 SET NOCOUNT ON;
 if (@yesterday is null) begin set @yesterday = GETDATE() - 1 end 
 /*
  if(@p_seccion = 'bancos')
  begin 
  update monitoreos_resultados set html=@html where id_cendeu = @id
  end
  else if(@p_seccion = 'juicios')
  begin
  update monitoreos_resultados set html=@html where id_juicio = @id
  end
  else if(@p_seccion = 'cheques')
  begin
  update monitoreos_resultados set html=@html where id_cheque = @id
 
  end
  else if(@p_seccion = 'cheque')
  begin
  update monitoreos_resultados set html=@html where id_cheque = @id and nro_cheque =@nro_cheque
 
  end
  */


 update monitoreos_resultados 
    set html = @html 
  where LOWER(tabla) = @p_tabla
    and id_tabla = @id
    and fecha = @yesterday 
END

GO

Used By

No items found