Re: [GENERAL] date range query help

Поиск
Список
Период
Сортировка
От novice
Тема Re: [GENERAL] date range query help
Дата
Msg-id ddcb1c340811191943t30bffd91i3996dec58b0f705f@mail.gmail.com
обсуждение исходный текст
Ответ на date range query help  (novice <user.postgresql@gmail.com>)
Список pgsql-sql
2008/11/20 brian <brian@zijn-digital.com>:
> novice wrote:
>>
>> 2008/11/20 Adam Rich <adam.r@sbcglobal.net>:
>>>
>>> select call.call_id,
>>>  call.datetime,
>>>  mobile_custodian.user_id,
>>>  call.mobile_no
>>>  call.charge
>>> from call, mobile_custodian
>>> where call.mobile_no = mobile_custodian.mobile_no
>>> and call.datetime between mobile_custodian.issue_date
>>>       and mobile_custodian.return_date
>>
>> sorry I get nothing :(
>>
>
> How about:
>
> SELECT call.call_id,
> call.datetime,
> mobile_custodian.user_id,
> call.mobile_no,
> call.charge
> FROM call
> LEFT JOIN mobile_custodian
> ON call.mobile_no = mobile_custodian.mobile_no
> AND call.datetime
>  BETWEEN
>  mobile_custodian.issue_date
>  AND
>  mobile_custodian.return_date;
>

this gave me nothing on the user_id field  :(

 call_id |      datetime       | user_id |  mobile_no  | charge
---------+---------------------+---------+-------------+--------
       1 | 2007-10-12 10:00:00 |         | 09455225998 |    4.5
       2 | 2007-10-16 13:27:00 |         | 09455225998 |    5.2

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

Предыдущее
От: novice
Дата:
Сообщение: Re: [GENERAL] date range query help
Следующее
От: "Rodrigo E. De León Plicet"
Дата:
Сообщение: Re: [GENERAL] date range query help