Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
2| Name | Data Type | Length | Description |
|---|---|---|---|
| @p_Cuit | varchar | 20 | |
| @p_todos | varchar | 1 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
--exec obtener_notas_contables '30581993834', 'S'
--select notas,comentarios , * from balances_contables where cuit = '30581993834' and estado = 'PUBLICADO'
CREATE OR ALTER PROCEDURE dbo.obtener_notas_contables
@p_Cuit varchar(20),
@p_todos varchar(1) = 'N'
AS
BEGIN
SET NOCOUNT ON;
SELECT top 5 convert(varchar(10),bc.fecha_balance,103) as fecha_balance,
fecha_balance as fecha_order,
--replace(convert(varchar(255), bc.notas),char(10),'<br>') as notas,
bc.notas as notas,
bc.comentarios,
bc.valoracion
from balances_contables as bc
where bc.cuit = @p_cuit and datediff(YY,bc.fecha_balance,getdate()) < 7
AND (@p_todos = 'S' or bc.visible = 1)
and notas is not null
order by fecha_order desc
END
-- [obtener_notas_contables] '30501677643'
GO
GO
--exec obtener_notas_contables '30581993834', 'S'
--select notas,comentarios , * from balances_contables where cuit = '30581993834' and estado = 'PUBLICADO'
CREATE OR ALTER PROCEDURE dbo.obtener_notas_contables
@p_Cuit varchar(20),
@p_todos varchar(1) = 'N'
AS
BEGIN
SET NOCOUNT ON;
SELECT top 5 convert(varchar(10),bc.fecha_balance,103) as fecha_balance,
fecha_balance as fecha_order,
--replace(convert(varchar(255), bc.notas),char(10),'<br>') as notas,
bc.notas as notas,
bc.comentarios,
bc.valoracion
from balances_contables as bc
where bc.cuit = @p_cuit and datediff(YY,bc.fecha_balance,getdate()) < 7
AND (@p_todos = 'S' or bc.visible = 1)
and notas is not null
order by fecha_order desc
END
-- [obtener_notas_contables] '30501677643'
GO
Depends On
1Used By
No items found