Hello Jupiter;
Sorry you are forced to use something as great as Firebird :-). I assume LAST_MODIFIED_ON is a TIMESTAMP field in your table and is being updated via a trigger or some other mechanism as records are modified. Your DATEDIFF syntax is incorrect; try: ... WHERE LICENSE_PLATE_NO<>'No plate found' AND DATEDIFF(second,LAST_MODIFIED_ON,current_timestamp)<120 or ... WHERE LICENSE_PLATE_NO<>'No plate found' AND DATEDIFF(minute,LAST_MODIFIED_ON,current_timestamp)<2 Regards, Jonathan --- In [email protected], Jupiter Punungwe <punungwe.tech@...> wrote: > > I am running this query > > SELECT LICENSE_PLATE_NO, IMAGE_NAME FROM table WHERE (LICENSE_PLATE_NO<>'No > plate found') AND (DATEDIFF(second FROM LAST_MODIFIED_ON TO > current_time)<120) > > the aim being to find all records modified in the last two minutes. > > I get the error message > > '[blah blah blah] expression evaluation not supported.' > > Does this mean I cannot put a function in a Firebird SQL statement? I can > do this in MySQL and SQL Server without any problem. In this particulat > project, I am forced to use Firebird for legacy reasons. > > Regards > Jupiter > > > [Non-text portions of this message have been removed] >
