If our stored procedure uses a variable:
[code]
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: John Minkjan
-- obiee101.blogspot.com
-- =============================================
ALTER PROCEDURE sp_dim_Accounts
@UserName varchar(50) = 'me'
AS
BEGIN
SET NOCOUNT ON;
SELECT dim_Account_ID, Account_Code, Account_Name, @UserName as USERNAME
FROM dim_Accounts
END
GO
[/code]
You can add the variable by using the VALUEOF() procedure:
@VARIABLENAME = N’VALUEOF(NQ_SESSION.VARIABLE_NAME)’
Till Next Time