dbo.carga_telefonos_afip

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_padron int 4
@p_telefono varchar 50
@p_tipo varchar 50

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE OR ALTER PROCEDURE dbo.carga_telefonos_afip
@p_id_padron int,
@p_telefono varchar(50),
@p_tipo varchar(50)

AS
BEGIN
 IF((select count(*) from telefonos 
  where (id_padron = @p_id_padron) 
            and ((telefono is null and @p_telefono is null) or (telefono  = @p_telefono)) ) = 0 )
  begin
   insert into telefonos (id_padron,telefono,tipo,created) values (@p_id_padron,@p_telefono,@p_tipo,GETDATE())
  end
END

GO

Depends On

1

Used By

No items found