Answer the question
In order to leave comments, you need to log in
Timestamp when querying the database, how to implement?
Table with ntimestamp#. How can I make each request start from the moment the previous one was launched?
select column1
from table1
where table1.ntimestamp > ?
Answer the question
In order to leave comments, you need to log in
If by "each request started from the moment the previous one was launched" it is understood that data is needed for a specific period of time, i.e. not taking into account changes in the table since the specified time, then you can use the retrospective memory area ( https://docs.oracle.com/cd/B14117_01/appdev.101/b1... Example:
SELECT * FROM employee AS OF TIMESTAMP
TO_TIMESTAMP(' 2003-04-04 09:30:00', 'YYYY-MM-DD HH:MI:SS')
WHERE name = 'JOHN';
i.e. query to the table -SELECT * FROM employee
Before executing the first query save the label time and insert in this way in all queries.If
the difference in fractions of seconds is acceptable, then you can create cursors in a row to all the tables of interest,
i.e.
pass the label scn - AS OF TIMESTAMP TO_TIMESTAMP('2003-04-04 09:30:00', 'YYYY-MM-DD HH:MI:SS')
condition - WHERE name = 'JOHN';
declare
x1 refcursor;
x2 refcursor;
...
begin
open x1 for select * from t1;
open x2 for select * from t2;
....
end;
Then, when running, the cursors will display data with a difference of fractions of a second.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question