Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Our system generated reports every day, and then sends ot to a folder called "Einstein Reports".
If I open this folder there will be folders for every year, in such a folder will be folders for every month and in such a folder will be folders for every day.
So the last day of June will be L:\Einstein Folders\2011\062011\30062011
And the next day will be L:\Einstein Folders\2011\072011\01072011
In many of my QV files I use the latest day's extracts. Usually I copy the files to my local drive and then use a FROM statement something like
What I would like to know is how I can, in my FROM statement, automatically have the script look at the LATEST day's folder so I can just open and reload my QlikView apps without having to do anything manually.
Example:
Account Extract: ***I replace this file every day
LOAD [1],
[2]
FROM
Transaction Extract: ***I Concatenate every daily file
CONCATENATE LOAD [1],
[2],
FROM [
Thanks,
Gerhard
Hi,
Create two variables which will store the latest month and current day.
Like this,
Let LMonth = Date(Today(),'MMYYYY');
Let LDay = Date(Today(),'DDMMYYYY');
Load [1],[2]
From
'L:\Einstein Reports\2011\'& $(LMonth)& '\'& $(LDay) &'\Daily_Transaction_Extract_*.txt'
Regards,
Kaushik Solanki
Hi,
You just need to define a parameter which you then use in the from:
Set Path = 'L:\Einstein Reports\2011\' & Year(tpday()) & month(today()) &' \' & Year(tpday()) & month(today()) & '\
Daily_Transaction_Extract_*.txt';Load
[1],
[2]
FROM $('Path');
Regards,
Jonathan
Hi,
Create two variables which will store the latest month and current day.
Like this,
Let LMonth = Date(Today(),'MMYYYY');
Let LDay = Date(Today(),'DDMMYYYY');
Load [1],[2]
From
'L:\Einstein Reports\2011\'& $(LMonth)& '\'& $(LDay) &'\Daily_Transaction_Extract_*.txt'
Regards,
Kaushik Solanki