Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
1| Name | Data Type | Length | Description |
|---|---|---|---|
| @Intervalo | int | 4 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.Imperium_Cant_Compliance_Intervalo
@Intervalo int
AS
BEGIN
SET NOCOUNT ON;
select distinct contratista, periodo,iif(contratista = contratista_1,'C','S') as led_seccion,contratista_1 from led_DOCS
where last_modified > getdate()-1500
and led_seccion = 'C'
union all
select distinct contratista, periodo,led_seccion,contratista_1 from led_DOCS
where last_modified > getdate()-1500
and led_seccion = 'E'
union all
select distinct contratista, periodo,led_seccion,contratista_1 from led_DOCS
where last_modified > getdate()-1500
and led_seccion = 'V'
order by periodo desc
DECLARE @ledSeccion varchar(1)
DECLARE @IDContratista INT
DECLARE @periodo INT
BEGIN
EXEC Imperium_Compliance_Periodo_Contratista @periodo,@IDContratista,@ledSeccion
END
END
GO
GO
CREATE OR ALTER PROCEDURE dbo.Imperium_Cant_Compliance_Intervalo
@Intervalo int
AS
BEGIN
SET NOCOUNT ON;
select distinct contratista, periodo,iif(contratista = contratista_1,'C','S') as led_seccion,contratista_1 from led_DOCS
where last_modified > getdate()-1500
and led_seccion = 'C'
union all
select distinct contratista, periodo,led_seccion,contratista_1 from led_DOCS
where last_modified > getdate()-1500
and led_seccion = 'E'
union all
select distinct contratista, periodo,led_seccion,contratista_1 from led_DOCS
where last_modified > getdate()-1500
and led_seccion = 'V'
order by periodo desc
DECLARE @ledSeccion varchar(1)
DECLARE @IDContratista INT
DECLARE @periodo INT
BEGIN
EXEC Imperium_Compliance_Periodo_Contratista @periodo,@IDContratista,@ledSeccion
END
END
GO
Depends On
2Used By
No items found