Subject | Re: [firebird-support] X minutes ago |
---|---|
Author | Arno Brinkman |
Post date | 2006-07-17T09:45:57Z |
Hi,
Also i expect it to be (CHECKIN_TIMESTAMP >= :CHECKIN_TIMESTAMP)
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database developer support:
http://www.databasedevelopmentforum.com
Firebird open source database (based on IB-OE) with many SQL-99 features:
http://www.firebirdsql.org
http://www.firebirdsql.info
Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info
> I need to select the rows which have the TIMESTAMP field value moreYou check for both "IS NULL" AND a value which will never be the case. Didn't you meant OR?
> than X minutes ago from the current moment.
>
> SELECT * FROM VISIT_DETAIL
> WHERE (CHECKOUT_TIMESTAMP IS NULL) AND (CHECKIN_TIMESTAMP
> <= :CHECKIN_TIMESTAMP)
Also i expect it to be (CHECKIN_TIMESTAMP >= :CHECKIN_TIMESTAMP)
> and then i popuplate the query parameter in Delphi applicationNote that the client's datetime doesn't have to be the same as the server!
>
> FQuery.ParamByName('CHECKIN_TIMESTAMP').AsDateTime := Now - X/(24*60);
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database developer support:
http://www.databasedevelopmentforum.com
Firebird open source database (based on IB-OE) with many SQL-99 features:
http://www.firebirdsql.org
http://www.firebirdsql.info
Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info