Re: date question

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: date question
Дата
Msg-id 20030616172402.GA2940@wolff.to
обсуждение исходный текст
Ответ на date question  (javier garcia - CEBAS <rn001@cebas.csic.es>)
Список pgsql-sql
On Fri, Jun 13, 2003 at 13:44:09 +0200, javier garcia - CEBAS <rn001@cebas.csic.es> wrote:
> 
> And I've got another related tables with a date field. I need to compare the 
> dates field in the other tables with "year", "month", "day" in this table.
> 
> Is there a way to create a table from this table, directly in Postgres in 
> which a date field is created based in the values of "year", "month", "day" 
> in this table?

Yes. You could concatenate the values for year, month and day and cast the
resulting string to date.

In the long run you might be better storing the dates as dates in the table
and extracting the year, month and day when reporting (or perhaps using
a view to add them as additional columns).


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

Предыдущее
От: "Julian Scarfe"
Дата:
Сообщение: Re: Ordering in an aggregate -- points to paths
Следующее
От: Tomasz Myrta
Дата:
Сообщение: Re: "No such attribute or function 'oid'"