Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
1| Name | Data Type | Length | Description |
|---|---|---|---|
| @dni | varchar | 8 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.api_validacion_mati
@dni varchar(8)
AS
BEGIN
SET NOCOUNT ON;
select STUFF((SELECT '/' + telefono FROM telefonos t2 WHERE t2.id_padron = padrones.id_padron FOR XML PATH('')),1,1,'') AS telefonos , cuerpo_clave dni,nombre_persona,datos_personas.c02_fecha_nac as fecha_nacimiento,datos_personas.defuncion as fecha_defuncion,identificacion from padrones
left join datos_personas on datos_personas.c01_cuit = padrones.identificacion
where
cuerpo_clave = @dni
and habilitado = 1
and identificador in (select identificador from identificadores where identificadores.country_code = 'AR')
/* and datos_personas.visible = 1 ESTO ESTÁ MAL YA QUE AL HACER EL LEFT JOIN SI ESTE VALOR NO VIENE ES OBVIO QUE NUNCA VA A SER 1*/
and isnull(datos_personas.visible,1) = 1
END
GO
GO
CREATE OR ALTER PROCEDURE dbo.api_validacion_mati
@dni varchar(8)
AS
BEGIN
SET NOCOUNT ON;
select STUFF((SELECT '/' + telefono FROM telefonos t2 WHERE t2.id_padron = padrones.id_padron FOR XML PATH('')),1,1,'') AS telefonos , cuerpo_clave dni,nombre_persona,datos_personas.c02_fecha_nac as fecha_nacimiento,datos_personas.defuncion as fecha_defuncion,identificacion from padrones
left join datos_personas on datos_personas.c01_cuit = padrones.identificacion
where
cuerpo_clave = @dni
and habilitado = 1
and identificador in (select identificador from identificadores where identificadores.country_code = 'AR')
/* and datos_personas.visible = 1 ESTO ESTÁ MAL YA QUE AL HACER EL LEFT JOIN SI ESTE VALOR NO VIENE ES OBVIO QUE NUNCA VA A SER 1*/
and isnull(datos_personas.visible,1) = 1
END
GO
Depends On
4Used By
No items found