Link to home
Start Free TrialLog in
Avatar of rdun25
rdun25

asked on

timestamp before select after an application has successfully done stuff with a select

I have a python script which is querying an sql-database. it does some stuff with the query, then puts a timestamp on the sql-database, so it only has to query the stuff that's happened after that timestamp.

The process takes a few minutes, so putting the timestamp at the end of the process means it might miss stuff that happened after the select query, but before it'd finished doing stuff.

I tried beginning a transaction, making a timestamp, doing the query, then committing the transaction, but it wouldn't give me the results of the select query until after i'd committed (defeating the whole point).

What is a good way of doing this?
ASKER CERTIFIED SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rdun25
rdun25

ASKER

Thank you so much. This is going to work way better then my plan. You've prevented another problem which would have come up later as well.