I have a query that I am running that I would like to understand how to return a result if the query brings back nothing.
At the moment it looks like this ...
WHERE EFOLDERID = '123456'AND ID = ('123' - 1)
What I am doing here is querying the ID column from the previous record to bring back a date, if this has null in the date column then it brings back the current date. This works as I want it to.
However if the record I am querying is the first in the table or recordset, then it does not return anything. How can I make sure it always brings back a result, preferably the current date?
Thanks in advance everyone!