dbo.ws_idverification_personales

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

3
Name Data Type Length Description
@pCuit varchar 20
@cantidad_invalidos int 4
@cantidad_validos int 4

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.ws_idverification_personales
@pCuit varchar(20) ,
@cantidad_invalidos int,
@cantidad_validos int
AS
BEGIN
 SET NOCOUNT ON;
select top(@cantidad_validos) apeyno as nombre_persona,1 as isValid from obras_sociales_beneficiarios where cuilti = @pCuit and cuilbe <> @pCuit
union all
SELECT top(@cantidad_invalidos) PADRONES.nombre_persona as empresa,0 as isValid 
FROM padrones
  WHERE id_padron in (select top 150 id_padron from padrones
  where tipo_persona='F' and (ABS(CAST(
  (BINARY_CHECKSUM
  (id_padron, NEWID())) as int))
  % 100) < 10
  )

  /*
  SELECT top(@cantidad_invalidos) nombre_persona,0 as isValid FROM padrones
    WHERE identificacion <> @pCuit /*and tipo_persona = 'F' and id_padron > 10000000 */
 and pre_clave in (20,23,24,27) and (ABS(CAST(
    (BINARY_CHECKSUM
    (identificacion, NEWID())) as int))
    % 1000) < 10
  
    */




END

GO