From: | Constantin Teodorescu <teo(at)flex(dot)ro> |
---|---|
To: | PostgreSQL general <pgsql-general(at)postgreSQL(dot)org> |
Subject: | Don't remember how to update a table :-( |
Date: | 1998-10-08 17:43:35 |
Message-ID: | 361CF9C7.94439EE1@flex.ro |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)flex(dot)ro
--
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA
From | Date | Subject | |
---|---|---|---|
Next Message | Terry Mackintosh | 1998-10-08 18:06:00 | Re: [ADMIN] RE: [HACKERS] Re: [COMMITTERS] 'pgsql/doc/src/sgml protocol.sgml' |
Previous Message | Jackson, DeJuan | 1998-10-08 16:43:49 | RE: [GENERAL] Emptying a database. |