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
CREATE OR ALTER PROCEDURE dbo.backend_empleados_periodo_ant
@p_Cuit varchar(20)
AS
BEGIN
SET NOCOUNT ON;
begin
select distinct periodo,
right('00'+(cast(datepart(MM,cast('20'+cast(periodo as char(4))+'01' as date)) as varchar)),2)+'/'+cast(DATEPART(YY,cast('20'+cast(periodo as char(4))+'01' as date)) as varchar) as periodo_mmyy
from empleados
where (cuit = @p_Cuit
and visible = '1')
order by periodo desc
end
END
GO
GO
CREATE OR ALTER PROCEDURE dbo.backend_empleados_periodo_ant
@p_Cuit varchar(20)
AS
BEGIN
SET NOCOUNT ON;
begin
select distinct periodo,
right('00'+(cast(datepart(MM,cast('20'+cast(periodo as char(4))+'01' as date)) as varchar)),2)+'/'+cast(DATEPART(YY,cast('20'+cast(periodo as char(4))+'01' as date)) as varchar) as periodo_mmyy
from empleados
where (cuit = @p_Cuit
and visible = '1')
order by periodo desc
end
END
GO
Depends On
1Used By
No items found