Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need help for writing Qlikview script. My Qlikview application requires 2 years data. e.g., for 2013 current year, it required data from 2011 and 2012.
When it will be new year i.e., 01/01/2014 I will be no longer using data for 2011
I am stroing data in Qvds like below
Jan_2011.qvd
Feb_2011.qvd
Mar_2011.qvd
and so on......
Please help me to write a script, if today's date is year start then deleteall qvds for year=year(Today())-3. Else keep all qvds.
Thanks in Advance..!!
Hi try to find the maxdate from the qvd using resident load
then load all the qvd data and add a filter condition
like where Date= YearStart(AddYears(vMaxDate,-2))
i wany to delet qvds which is not requied..there are aroung 36 qvds.
Can you pl provide me script. My requirement is
IF Date(Today())=YearStart(Today())
Delete all qvds where qvd name contains Year(Today())-3
IF YEARSTART(today())=01/01/2014 then delete all qvds for 2011
Hi deleting means first it will load the data then it will delete all the qvds.
i would suggest that after loading from the qvds try to move to different folder that can be done in the script
At last add the command Execute cmd.exe/c move " Source Directory" "Destination Directory"
if u want to delte use DEL command instead of move
Shree,
We are not creating qvd daily for single month qvd it takes 2 hrs. we have huge data. We are having incremental load process. In qlikview application I am not loading data fron qvds which qre having 3 or more than 3 yrs data.
for 2013 i need only 2012 and 2011 qvds.
When it will be 2014 i will use 2013 and 2012 qvds. I need to delete 2011 qvds when i move to 2014.
Qvd names are like 'Month_Year'.qvd(i.e., Jan_2011
)Every month has seprate qvd
Hope you understand my requirement
If today's date is year start
If today()='01/01/2013'
Delete all qvd(name containing year 2010 )
Else
Do not delete anything