validtimetemporal
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
validtimetemporal [2015/07/22 09:58] – z0hpvk | validtimetemporal [2025/03/08 22:24] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Valid Time Temporal ===== | ===== Valid Time Temporal ===== | ||
+ | ==== Create Tables ==== | ||
Create a period using existing columns | Create a period using existing columns | ||
< | < | ||
Line 18: | Line 19: | ||
PERIOD FOR student_module_period | PERIOD FOR student_module_period | ||
);</ | );</ | ||
+ | |||
+ | ==== Viewing Data ==== | ||
We can now create **AS OF PERIOD FOR** queries.\\ | We can now create **AS OF PERIOD FOR** queries.\\ | ||
The below query finds all students on a currently active course. | The below query finds all students on a currently active course. | ||
- | < | + | < |
- | PERIOD FOR student_module_period SYSDATE sm;</ | + | |
Can also create **VERSIONS PERIOD FOR ... BETWEEN** queries.\\ | Can also create **VERSIONS PERIOD FOR ... BETWEEN** queries.\\ | ||
- | < | + | The below query finds all students that were active in the last week. |
- | | + | < |
+ | | ||
+ | |||
+ | ==== Using Flashback ==== | ||
+ | You can also use the DBMS_FLASHBACK_ARCHIVE.ENABLE_AT_VALID_TIME procedure | ||
+ | < | ||
+ | DBMS_FLASHBACK_ARCHIVE.ENABLE_AT_VALID_TIME | ||
+ | END; | ||
+ | |||
+ | BEGIN | ||
+ | DBMS_FLASHBACK_ARCHIVE.ENABLE_AT_VALID_TIME (' | ||
+ | END; | ||
+ | |||
+ | BEGIN | ||
+ | DBMS_FLASHBACK_ARCHIVE.ENABLE_AT_VALID_TIME (' | ||
+ | END;</ |
validtimetemporal.1437559084.txt.gz · Last modified: 2025/03/08 22:23 (external edit)