dbo.trulioo_obtener_datos_cuit

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 11

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- =============================================
-- Author: <Samuel Gonzalez>
-- Create date: <02 Feb 2018>
-- Description: <Obtener datos de cuit>
-- =============================================
CREATE OR ALTER PROCEDURE dbo.trulioo_obtener_datos_cuit 
 @p_cuit varchar(11)
AS
BEGIN
 
 SET NOCOUNT ON;

 select top 1
        ---------------- Item -----------------------------
        p.nombre_persona as nombre_completo,
        p.sexo           as genero,
        dp.c02_fecha_nac as fecha_nac,
        dt.domicilio,
        dt.codpos        as zip,
        ---------------- GlobalResponseData ---------------
        'Ok'             as financial_status,
        GETDATE()        as request_date,
        '20000'          as transaction_id,
        1                as transaction_status,
        '2018'           as period_year,
        '10'             as period_month,
        '100'           as period_count
    from padrones p
    left join DATOS_PERSONAS dp on (p.identificacion = dp.c01_cuit and dp.visible = 1)
    left join domicilios_todos dt on (p.identificacion = dt.cuit and dt.visible = 1 and (tipo_domicilio = 'D'))
    where (p.identificacion = @p_cuit) and (p.habilitado = 1)

END

GO

Used By

No items found