dbo.Clientes_dashboard

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
/*
exec [Clientes_dashboard]
*/

-- Clientes activos de LED o IMPERIUM, que tengasn activo el producto graficos_dashboard

CREATE OR ALTER PROCEDURE dbo.Clientes_dashboard 
AS
BEGIN
 SET NOCOUNT ON;
 select  distinct clientes.cliente as cliente, clientes.nombre_cliente  
   from LN_cliente_productos
   inner join clientes on clientes.cliente = LN_cliente_productos.cliente
   inner join clientes_productos on clientes_productos.cliente = clientes.cliente

   where clientes.estado_cliente = 'A'
   
   AND ln_cliente_productos.producto = 2041 -- graficos_dashboard
   and ln_cliente_productos.activo = 1 
   
   and clientes_productos.id_producto in (73,47) 
   and clientes_productos.activo = 1
   and isnull(clientes_productos.fecha_desde,'1901-01-01') <= getdate()
   and isnull(clientes_productos.fecha_hasta,'3000-12-31') >= getdate()

   --and clientes.cliente = 806892136

  
end 

GO

Used By

No items found