dbo.listado_mantenimiento_cuits_uno

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

2
Name Data Type Length Description
@client_id int 4
@cuit varchar 20

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

CREATE OR ALTER PROCEDURE dbo.listado_mantenimiento_cuits_uno
@client_id int, 
@cuit varchar(20)
AS

BEGIN
     SET NOCOUNT ON;


  select  cuit,
    nombre_persona,
    convert(varchar(13),
    monitoreos.fecha_modificacion,103) as fecha_modificacion,
    productos_secciones.nombre_seccion as seccion_mantenimiento,
    convert(varchar(13),
    fecha_vigencia_mantenimiento,103) as fecha_vigencia_mantenimiento,
    cliente,
    user_id,
    id_mantenimiento, observaciones_cliente as observaciones
   from monitoreos 
  inner join padrones
         on padrones.identificacion = cuit
     and habilitado = 1 
 inner join productos_secciones 
       on productos_secciones.id_seccion = monitoreos.seccion_mantenimiento
  where seccion_mantenimiento != 99 
    and cliente = @client_id 
    and monitoreos.visible = 1
    and cuit = @cuit
  order by fecha_vigencia_mantenimiento desc
END

GO

Used By

No items found