dbo.traducciones_dinamicas_cliente

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

5
Name Data Type Length Description
@accion varchar 50
@value varchar 500
@blade varchar 500
@app_id int 4
@cliente int 4

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- =============================================
-- Author: <Leonel Turchetto>
-- Create date: <11 Feb 2020>
-- Description: <setea una nueva traducción dinámica para un cliente / obtiene todas las traducciones dinámicas de un cliente.>
-- =============================================
create OR ALTER PROCEDURE dbo.traducciones_dinamicas_cliente
@accion varchar(50),
@value varchar(500),
@blade varchar(500),
@app_id int,
@cliente int
 -- Add the parameters for the stored procedure here
AS
BEGIN
 SET NOCOUNT ON;
 if(@accion = 'grabar_nueva_key_cliente')
 begin
  declare @existe int = (select count(*) from traducciones where blade = @blade and app_id = @app_id and app_key = @app_id and app_id = @app_id and cliente = @cliente)
  if(@existe = 0)
  begin
   insert into traducciones (app_id,app_key,spa,por,eng,blade,created,valor_dinamico,cliente) values (@app_id,@value,@value,@value,@value,@blade,getdate(),1,@cliente) 
  end
 end
 if(@accion = 'obtener_traducciones_cliente')
 begin
  select blade,app_key,spa,por,eng from traducciones where valor_dinamico = 1 and cliente = @cliente
 end
END
GO

Depends On

1

Used By

No items found