dbo.scoreV2

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

4
Name Data Type Length Description
@p_accion varchar 50
@p_cuit varchar 20
@p_cliente int 4
@p_killer int 4

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO

/*Stores y acciones correspondientes a la segunda versión del score.*/
CREATE OR ALTER PROCEDURE dbo.scoreV2
@p_accion varchar(50),
@p_cuit varchar(20),
@p_cliente int = 0,
@p_killer int = 0
AS
BEGIN
    SET NOCOUNT ON;

 if(@p_accion = 'obtener_score_personalizado')
 begin
  select nombre_grupo,afecta_directo,item,cant_desde,cant_hasta,dias_desde,dias_hasta,valor,created,killer 
  from score_personalizado 
  where client_id = @p_cliente and killer = @p_killer
 end

 if(@p_accion = 'obtener_grupos')
 begin
  select id_grupo,nombre,descripcion from scp_grupos
 end

END
GO

Used By

No items found