Join three fields into one on same table

Поиск
Список
Период
Сортировка
От jrivero
Тема Join three fields into one on same table
Дата
Msg-id 745c6484-7e2c-464e-ae0f-4867d021b466@56g2000hsm.googlegroups.com
обсуждение исходный текст
Ответы Re: Join three fields into one on same table
Re: Join three fields into one on same table
Список pgsql-general
Hi, i need help for a query. I have three fields, year, month and day
into table and need join and update another field named date on same
table.

My problem is not that make update query.

With this query have the value of the update:
> select year || '-' || month || '-' || day || ' 01:00:00' as newdate from table

but this another query not have correct syntax...
> update table set date=(select year || '-' || month || '-' || day || ' 01:00:00' as newdate from table)

Regards,
Jordi

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

Предыдущее
От: "${spencer}"
Дата:
Сообщение: Re: writing a function without installing a language
Следующее
От: "samslists@gmail.com"
Дата:
Сообщение: Re: Setting up phppgadmin under https/ssl (Apache)