Don't remember how to update a table :-(

Поиск
Список
Период
Сортировка
От Constantin Teodorescu
Тема Don't remember how to update a table :-(
Дата
Msg-id 361CF9C7.94439EE1@flex.ro
обсуждение исходный текст
Список pgsql-general
I don't recall how to update a field in a table with values from another
table based on a relationship.

Table 'one' has fields 'f1','f2','f3'
Table 'two' has fields 'f1','f2','f3'

I want to update field 'f3' in table 'one' with the values of 'f3' from
table 'two' based on relationship (one.f1=two.f1) and (one.f2=two.f2)

I thought that it should work :

update one set one.f3=two.f3 from one,two where (one.f1=two.f1) and
(one.f2=two.f2);

But it doesn't work!

Am I doing something wrong ?


Please me cc: directly to teo@flex.ro
--
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA

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

Предыдущее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [GENERAL] Emptying a database.
Следующее
От: Andy Lewis
Дата:
Сообщение: SELECT Date