[Info-ingres] Selecting rows based on time range
Allan Biggs
Allan.Biggs at GBR.dupont.com
Thu Mar 10 11:37:24 UTC 2016
maybe something like
select date_part('hours',on_date) from table
do you know
http://www.r20.nl/TheSQLGuidetoIngres-AppendixB.pdf
From: "abc at google.com" <abc at google.com>
To: info-ingres at lists.planetingres.org
Date: 10/03/2016 11:10
Subject: [Info-ingres] Selecting rows based on time range
Sent by: info-ingres-bounces at lists.planetingres.org
Hi,
I want to find all rows in my database that were updated between 10:00
and 11:00 (regardless of day). I have a column called update_date
that holds the date and time of the row's last update.
I'm trying something like this:
select * from table
where
update_date-date_trunc('day',update_date) between '10:00:00' and
'11:00:00'
But can't quite get it to work. Any suggestions?
Thanks.
_______________________________________________
Info-ingres mailing list
Info-ingres at lists.planetingres.org
http://lists.planetingres.org/mailman/listinfo/info-ingres
This communication is for use by the intended recipient and contains
information that may be Privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender by
return e-mail and delete this e-mail from your system. Unless explicitly
and conspicuously designated as "E-Contract Intended", this e-mail does
not constitute a contract offer, a contract amendment, or an acceptance
of a contract offer. This e-mail does not constitute a consent to the
use of sender's contact information for direct marketing purposes or for
transfers of data to third parties.
Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean
http://www.DuPont.com/corp/email_disclaimer.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20160310/c7df631c/attachment.html>
More information about the Info-ingres
mailing list