Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using outer variable

Hi

I am going to get a variable from user before loading data ,and limit data with this value in where condition of load or select .

like this :

IDProduct : get from users

select * from tab1 where ID=$IDProduct;

how can i do it ?

2 Replies
prieper
Master II
Master II

Variables need to be included in brackets: $(IDProduct), if it is a string, it should be included in apostrophs:

IDProduct : get from users
select * from tab1 where ID='$(IDProduct)';


HTH
Peter

Not applicable
Author

How can i use stored procedure output in other scripts

like this :

sql_sp: SQL declare @ID_Hogh int Execute BSICRS.[dbo].[S_IDPprices] @ID_Hogh=@ID_Hogh output

Select @ID_Hogh as result;

let ID_SP = load result resident sql_sp;

select * from table1 where ID=$(ID_SP );

thanks