Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
1| Name | Data Type | Length | Description |
|---|---|---|---|
| @id_consulta | int | 4 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.FIDE_WS_CLIENT_ANSWER
@id_consulta int
AS
BEGIN
SET NOCOUNT ON;
SELECT
id_cliente as Cliente,
nro_consulta_cliente as Nro_Consulta,
razon_social,
cuit,
dni,
/* status,*/
CASE
WHEN status = 'V' THEN 'SI'
WHEN status = 'A' THEN 'SI'
WHEN status = 'R' THEN 'NO'
END AS resultado,
/*
detalle,
charindex(':',detalle) as Pos,
*/
CASE WHEN status = 'R' THEN substring(detalle,0,charindex(':',detalle))
ELSE ' '
END AS detalle,
CASE WHEN respuesta <> 'A' THEN 'VERIFIQUE LOS DATOS INGRESADOS'
END AS error
/* substring(detalle,0,charindex(':',detalle)) as detalle */
FROM fide_ws_data
WHERE id_consulta = @id_consulta
END
GO
GO
CREATE OR ALTER PROCEDURE dbo.FIDE_WS_CLIENT_ANSWER
@id_consulta int
AS
BEGIN
SET NOCOUNT ON;
SELECT
id_cliente as Cliente,
nro_consulta_cliente as Nro_Consulta,
razon_social,
cuit,
dni,
/* status,*/
CASE
WHEN status = 'V' THEN 'SI'
WHEN status = 'A' THEN 'SI'
WHEN status = 'R' THEN 'NO'
END AS resultado,
/*
detalle,
charindex(':',detalle) as Pos,
*/
CASE WHEN status = 'R' THEN substring(detalle,0,charindex(':',detalle))
ELSE ' '
END AS detalle,
CASE WHEN respuesta <> 'A' THEN 'VERIFIQUE LOS DATOS INGRESADOS'
END AS error
/* substring(detalle,0,charindex(':',detalle)) as detalle */
FROM fide_ws_data
WHERE id_consulta = @id_consulta
END
GO
Depends On
1Used By
No items found