Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I've got a process that is run every 10 minutes which does it thing. Now I've been asked to have an snapshot of information every 6 hours only. Instead of creating another QVD that runs every 6 hours, is there a way to Store the information every 6 hours in the document that runs every 10 minutes.
Basically I'm looking at the script and seeing if I can do something to this extent but qlikview doesn't like that.
#simplified example
If(time = 6)
{
Store Table INTO test.csv
}
Any ideas are greatly appreciated
Perhaps like this. I've not waited 6 hours to make sure it works when the file already exists, but I'd expect it to.
STORE [Test] INTO Test.qvd (QVD);
LET vNow = now(1);
LET vFile = filetime('Test.csv');
LET vHours = rangesum(now(1),-filetime('Test.csv')) * 24;
TRACE >> Now = $(vNow);
TRACE >> Test.csv created = $(vFile);
TRACE >> Hours difference = $(vHours);
IF $(vHours) > 5.95 THEN
STORE [Test] INTO Test.csv (TXT);
END IF
John, good to see you back on the community.
Hi John,
Is it possible to do something like the below?
if(Date(now(1), 'H:mm') >= '17:00') OR (Date(now(1), 'H:mm') > '17:10') THEN
STORE Customers INTO Test.csv (TXT);
END IF
I tried it the script does not throw an error, but it does not save a file
IF((ReloadTime()>=timestamp(Today() + maketime(5)) AND ReloadTime()<timestamp(Today() + maketime(5,10))) OR (ReloadTime()>=timestamp(Today() + maketime(17)) AND ReloadTime()<timestamp(Today() + maketime(17,50)))) THEN
STORE [Customers] INTO Test.csv (TXT);
END IF
That worked!!!