From: Blaise Carrupt <bc@mjtsa.com>
To: pgsql-sql@postgresql.org
Subject: Re: SQL Query using time
Date: Tue, 12 Dec 2000 16:49:48 GMT
Message-ID: <200012121649.QAA01449@mjtsa.com> (raw)
> Is it possible to carry out the comparison in the following manner
> select name from table where 00:12 is between 23:58 and 00:30
You could try something like
WHERE ('00:12' BETWEEN startTime AND endTime
AND startTime <= endTime)
OR ('00:12' NOT BETWEEN endTime AND startTime
AND startTime > endTime)
Should work slower, but should work... And take care to equality with BEWTEEN.
____________
B. Carrupt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: bc@mjtsa.com
Subject: Re: SQL Query using time
In-Reply-To: <200012121649.QAA01449@mjtsa.com>
References: <200012121649.QAA01449@mjtsa.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox