Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Thanks for taking the time to read this....
Can I add a resident load in SQL FROM clause?
Like so ...
TMP:
SQL SELECT * from table WHERE date_parse(date,'%Y-%m-%d') < date_trunc('month', current_date)
and
date_parse(date,'%Y-%m-%d') >= date_trunc('month', current_date) - interval '1' month
;
Main:
SQL SELECT item, max(date)
FROM Resident TMP
GROUP BY 1;
I'm more of a Qlik Sense Guy, but I think this is not possible in neither of the Qlik products (Qlikview and or Qlik Sense)
what you could do is load the TMP table into qlik first. after that do something like Main: noconcatenate Load * resident TMP Group BY 1; and drop the TMP table with drop table TMP;
@devarshigoswami Whenever you type SQL in Script Editor, Qlik will hit the SQL server to fetch the data from there.
In your Example, you don't have to mention SQL again before the load for the 'Main' table since that data is already fetched. All that you need to do is:
Noconcatenate
Main:
Load * Resident TMP group b column_name;
If you want to process the result of another SQL, Just use a nested query!!
Main:
SQL
SELECT A.item, max(A.date)
FROM
(SELECT * from table WHERE date_parse(date,'%Y-%m-%d') < date_trunc('month', current_date)
and
date_parse(date,'%Y-%m-%d') >= date_trunc('month', current_date) - interval '1' month
) A
Group by A.item
;