From: kcolagio@wc.eso.mc.xerox.com
To: pgsql-sql@postgreSQL.org
Subject: [SQL] Time related question...
Date: Wed, 17 Jun 1998 05:33:29 PDT
Message-ID: <199806171233.IAA01017@bentley.eso.mc.xerox.com> (raw)
I have a database that tracks the service calls we do. In the database
are abstime values for:
dateentered
dateclosed
dateassigned
datecontacted
I have perl scripts managing the interaction between our web site and the
database.
My question is: what is the SQL statement that will allow me to find:
1) a list of the calls where the difference between the dateentered and
dateclosed is less than (say) 3 days.
I have tried:
Select * from servicecall where (dateentered <#> dateclosed) #<= 3 days;
Select * from servicecall where (dateclosed - dateentered) #<= 3 days;
Select * from servicecall where (dateentered <#> dateclosed) #<= @3 days;
Select * from servicecall where (dateclosed - dateentered) #<= @3 days;
Any suggestions?
Thanks.
--
Kevin Colagio, Systems Administrator, Webmaster,
and perpetual student.
kcolagio@wc.eso.mc.xerox.com
Personal URL:<http://www.rit.edu/~kdc5072;
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: kcolagio@wc.eso.mc.xerox.com
Subject: Re: [SQL] Time related question...
In-Reply-To: <199806171233.IAA01017@bentley.eso.mc.xerox.com>
References: <199806171233.IAA01017@bentley.eso.mc.xerox.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