This is not difficult.
CREATE MACRO PassValidtime(mydate DATE) AS (
validtime as of :mydate
select *
from
MyTemporal_Table;)
EXEC PassValidtime('2012-12-01')
You can also pull the validtime date from a nested select as shown below.
validtime as of (SELECT CURRENT_DATE -1)
select *
from
MyTemporal_Table;
↧