[SQL] Time related question...

Поиск
Список
Период
Сортировка
От kcolagio@wc.eso.mc.xerox.com (Kevin Colagio)
Тема [SQL] Time related question...
Дата
Msg-id 199806171233.IAA01017@bentley.eso.mc.xerox.com
обсуждение исходный текст
Ответы Re: [SQL] Time related question...
Re: [SQL] Time related question...
Список pgsql-sql
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>

В списке pgsql-sql по дате отправления:

Предыдущее
От: Benedikt Eric Heinen
Дата:
Сообщение: Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents)
Следующее
От: Patrice Hédé
Дата:
Сообщение: Re: [SQL] Time related question...