Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day
I need to loop through this passing 'December 2019' , 'January 2020' and 'February 2020' as parameters into the sql statement
Stats:
Load*;
SQL EXEC Report.Prior_Month_Substitution @FinancialPeriod = N'January 2020';
Can this be done in Qlik or only using SQL code .
I don't see why you can't do it with a for next loop in the load script.
Something along the lines of:
let myParm1='December 2019';
let myParm2='Januuary 2020';
let myParm3='February 2020';
for A=1 to 3
let mySQL='SQL EXEC Report.Prior_Month_Substitution @FinancialPeriod = N' & myparm&A;
Load *;
mySQL;
next A;
I just need to pass the last 3 months dates into the parameter
I don't see why you can't do it with a for next loop in the load script.
Something along the lines of:
let myParm1='December 2019';
let myParm2='Januuary 2020';
let myParm3='February 2020';
for A=1 to 3
let mySQL='SQL EXEC Report.Prior_Month_Substitution @FinancialPeriod = N' & myparm&A;
Load *;
mySQL;
next A;