Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
We have a requirement to update our QVDs from a database table hourly. Using the Insert, Update & Delete option, so that the QVD data will match the database table each reload.
Have been using Reloadtime() but this is when the last reload completes, not when it starts.
Is there a way to either get the last start time that the QVW was reloaded or use Peek to check the latest modified time within the QVD?
Current code is as follows:
Let vThisExecTime = Now( );
Let vLastExecTime = Reloadtime();
TABLE:
SQL SELECT *
FROM DBTABLE
WHERE TIMEMODIFIED >= TO_DATE('$(vLastExecTime)', 'DD/MM/YYYY HH24:MI:SS')
AND TIMEMODIFIED < TO_DATE('$(vThisExecTime)', 'DD/MM/YYYY HH24:MI:SS');
Concatenate LOAD *
FROM TABLEQVD.qvd (QVD)
WHERE NOT Exists(PRIMARYKEY);
INNER JOIN
SQL SELECT PRIMARYKEY
FROM DBTABLE;
STORE TABLE into TABLE.qvd (QVD);
Hello!
You can use this way:
t1:
Load max(TIMEMODIFIED) as TIMEMODIFIED
from TABLEQVD.qvd (QVD);
let vLastExecTime=peek('TIMEMODIFIED',0,'t1');
drop table t1;
Maybe you can write something like this,
Let vLastRLStartTime = vThisExecTime;
before your code starts...
Let vThisExecTime = Now( );
Let vLastExecTime = Reloadtime();
Hi William,
Are you using Publisher? You can set up an hourly task that reload whichever QVDs you need to update or complete QVWs.
Miguel