dbo.actualizar_padron_servicio_afip

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

4
Name Data Type Length Description
@id_padron int 4
@estado bit 1
@nombre_persona varchar 200
@upd bit 1

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.actualizar_padron_servicio_afip
@id_padron int,
@estado bit,
@nombre_persona varchar(200),
@upd  bit

AS


BEGIN
    SET NOCOUNT ON;
 
 if(@upd = 1)
 begin
  update padrones set afip_activo=@estado,ismodified=getdate(),
  --nombre_persona=@nombre_persona 
  nombre_persona = iif((isnull(modificado_por,'') != 'R' or isnull(nombre_persona,'') = '') and isnull(@nombre_persona,'') != '',
               @nombre_persona,nombre_persona)
  where id_padron = @id_padron
 end
 else
 begin
  update padrones set ismodified=getdate() where id_padron = @id_padron
 end
 END 

GO

Depends On

1

Used By

No items found