Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Temporal Macro / Dynamic SQL in a View - response (6) by fnewbrough

$
0
0
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;

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>