dbo.api_buscar_empleado_de

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

1
Name Data Type Length Description
@identificacion varchar 20

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
--[api_buscar_razon_social] '20335754655',''
CREATE OR ALTER PROCEDURE dbo.api_buscar_empleado_de
@identificacion varchar(20)

AS
BEGIN
    begin try
   if(@identificacion != '')
   begin

   select distinct nombre_persona as nombre_empleador,cuit as cuit_empleador,periodo from empleados
   inner join padrones on padrones.identificacion = empleados.cuit
   where empleados.cuil = @identificacion
     and padrones.habilitado = 1
     and periodo = (select max(periodo) from empleados where cuil = @identificacion)

   end
   
    end try
    begin catch
        select ERROR_MESSAGE() as error
    end catch
END

GO

Used By

No items found