This may seem like a fundamental question, but I have been playing around with the temporal keywords and have yet to come up with the desired results.
Is there a way to get an answerset with only closed records?
SEQUENCED VALIDTIME AND NONSEQUENCED TRANSACTIONTIME returns all records, open or closed, history, current, or future. And SEQUENCED VALIDTIME AND TRANSACTIONTIME AS OF TIMESTAMP '[Timestamp]' returns all record that are/were open on that date. The problem is, Teradata will not allow me to execute a SEQUENCED VALIDTIME AND SEQUENCED/NONSEQUENCED TRANSACTIONTIME PERIOD (TIMESTAMP '[timestamp]',TIMESTAMP'[timestamp]').
After all of that, I tried to do a query with SEQUENCED VALIDTIME AND NONSEQUENCED TRANSACTION [...] WHERE TT <> PERIOD(TIMESTAMP '[timestamp]',TIMESTAMP'[timestamp]'). This executed, but did not return what I wanted, instead returning all records without the specified time period. So the direction that I would travel in trying to answer this question is: Is there a way in which I can use a wildcard for the first timestamp in the above code such that the where clause only depends upon the ending stamp (in this case would be '9999-12-31 23:59:59.999999+00:00')?
I'm not terribly familiar with the temporal keywords. I've only experimented with them a little, but couldn't you do basically what you describe in the last sentence? Could you construct a query that returns ALL records and then use the WHERE clause with some of the PERIOD data type functions to filter out records where the end timestamp is '9999-12-31 23:59:59.999999+00:00'?