Hi,
I have a script which is intented to load an image from an Images table in a database. In the table there is a datetime column 'LastImpression' which holds the date and time of the last time this image was displayed.
I would like to create an SQL statement which will:
- Return a single record with the 'oldest' LastImpression Date
- Update the same record that was just loaded with a new datetime value in the LastImpression column
and I would like to have it all in one statement. Is it possible?
Any help would be greatly appreciated.
Start Free Trial