Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I'm saving today's date in a qvd table as information for the last data update by using following function.
LOAD * INLINE [LastDay];
Concatenate(Dashboard_Risk_Actual3) LOAD
Today() as LastDay
AUTOGENERATE(1);
STORE Dashboard_Risk_Actual3 INTO Dashboard_Risk_Actual3.qvd (qvd);
DROP table Dashboard_Risk_Actual3;
Now I want to use that date in an IF..ENDIF clause like
IF LastDay<>Today() THEN .......
How can I get the value from the qvd as paramter for my IF..ENDIF clause.
I hope anybody is having an idea for that.
Best regards Hans-Peter
To get a value from a qvd you needs to load the qvd with/without certain where-clauses and/or any transformation like aggregations and then picking your wanted value per peek() or fieldvalue() or lookup(). If your load returned just one record or an easy to predicting structure it's not difficult to fetch the wanted value - if not it could become complicated ...
Your scenario looked as if it could be solved easier just by assigning the last run-time or the max. value of a date/key to a variable, like:
if vLastRun < today() then
let vLastRun = today();
... further statements ...
end if
- Marcus
To get a value from a qvd you needs to load the qvd with/without certain where-clauses and/or any transformation like aggregations and then picking your wanted value per peek() or fieldvalue() or lookup(). If your load returned just one record or an easy to predicting structure it's not difficult to fetch the wanted value - if not it could become complicated ...
Your scenario looked as if it could be solved easier just by assigning the last run-time or the max. value of a date/key to a variable, like:
if vLastRun < today() then
let vLastRun = today();
... further statements ...
end if
- Marcus
Thanks for such an easy solution. I was not aware that values of variables are kept in the qvw.