dbo.backend_visible_datos_generales

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

3
Name Data Type Length Description
@p_id_datos_generales int 4
@p_id_padron int 4
@p_usuario int 4

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE OR ALTER PROCEDURE dbo.backend_visible_datos_generales
@p_id_datos_generales int,
@p_id_padron int, 
@p_usuario int
AS
BEGIN
    SET NOCOUNT ON;
 
 update datos_generales
 set visible = iif(visible='0', '1', '0'),
  id_padron = @p_id_padron, 
  modified = GETDATE(),
  modified_by = @p_usuario
  where id_datos_generales = @p_id_datos_generales

    if (select visible from datos_generales where id_datos_generales = @p_id_datos_generales) = '1' 
 begin
  select '0' as error, 'Activación OK' as mensaje
 end
 else
 begin
  select '0' as error, 'Baja OK (el registro pasó a Inactivo)' as mensaje
 end 
 
END 

GO

Depends On

1

Used By

No items found