dbo.pe_obtener_inicio_actividad

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

1
Name Data Type Length Description
@p_Cuit varchar 20

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
/*
[pe_obtener_inicio_actividad] '27208925658'
*/

CREATE OR ALTER PROCEDURE dbo.pe_obtener_inicio_actividad
@p_Cuit varchar(20)
AS


BEGIN
  SET NOCOUNT ON;
  -- fecha de inicio actividad toma la menor fecha de los impuestos 
  select fecha_inicio_actividad = convert(varchar(50),min(fecha_inscripcion))
     from padron_impuestos
    where id_padron = (select id_padron from padrones where identificacion = @p_Cuit and habilitado = 1) 
      and fecha_inscripcion != '1901-01-01'
END  
GO

Used By

No items found