Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- =============================================
-- Author: <Patricio Lecolant>
-- Create date: <01/03/2018>
-- Description: <Obtiene registros de la tabla JUICIOS, con id_tipo_causa = NULL o VACIO >
-- modificado: Leonel turchetto 08/03/2018
-- =============================================
CREATE OR ALTER PROCEDURE dbo.obtener_juicios_sin_tipo_causa
AS
BEGIN
SET NOCOUNT ON;
SELECT top 1000 count(tipo_de_novedad) as cantidad,tipo_de_novedad from juicios where (id_tipo_causa is null or id_tipo_causa ='') and tipo_de_novedad !=''
and tipo_de_novedad not in(
select tipo_de_novedad_vieja from tarea_juicios
)
and (anio >= year(GETDATE()-1800) or (fecha_causa is not null and fecha_causa > GETDATE()-1800))
GROUP BY tipo_de_novedad
ORDER BY cantidad desc
END
GO
GO
-- =============================================
-- Author: <Patricio Lecolant>
-- Create date: <01/03/2018>
-- Description: <Obtiene registros de la tabla JUICIOS, con id_tipo_causa = NULL o VACIO >
-- modificado: Leonel turchetto 08/03/2018
-- =============================================
CREATE OR ALTER PROCEDURE dbo.obtener_juicios_sin_tipo_causa
AS
BEGIN
SET NOCOUNT ON;
SELECT top 1000 count(tipo_de_novedad) as cantidad,tipo_de_novedad from juicios where (id_tipo_causa is null or id_tipo_causa ='') and tipo_de_novedad !=''
and tipo_de_novedad not in(
select tipo_de_novedad_vieja from tarea_juicios
)
and (anio >= year(GETDATE()-1800) or (fecha_causa is not null and fecha_causa > GETDATE()-1800))
GROUP BY tipo_de_novedad
ORDER BY cantidad desc
END
GO
Depends On
2Used By
No items found