dbo.apikey_trazabilidad

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

1
Name Data Type Length Description
@p_tokenid int 4

SQL Script

Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
/*
exec [apikey_trazabilidad] 78
select * from apikey where id_api_key = 78
select * from trazabilidad where id_plataforma = 'API'
*/

CREATE OR ALTER PROCEDURE dbo.apikey_trazabilidad
@p_tokenid int
 
AS

BEGIN
    SET NOCOUNT ON;

 
 select isnull(users.first_name,'') + ' ' + isnull(users.last_name,'') + ' - ' +  convert(varchar,created,120) + ': ' +  texto as trazabilidad
  from trazabilidad 
  left join users on users.user_id = trazabilidad.user_id
  where id_plataforma = 'API' and doc_id = @p_tokenid 
  order by created desc

END 

GO

Used By

No items found