Re: UPDATE the field of a table with fields from another table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ener(at)ibb(dot)nl
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: UPDATE the field of a table with fields from another table
Date: 2006-10-15 20:46:57
Message-ID: 25907.1160945217@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Balvie <ener(at)ibb(dot)nl> writes:
> UPDATE b1_naam
> SET telnr = t.telnr
> FROM b1_telco as t
> WHERE
> b1_naam.relcode = b1_telco.relcode AND
^^^^^^^^ should be t
> b1_naam.naam like 'Bakke%';

Less-obsolete versions of Postgres would have warned you about this,
or even reported it as an error.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Rafael Orta 2006-10-16 03:19:33 -- Problem loading plperlu --
Previous Message Balvie 2006-10-15 20:22:41 UPDATE the field of a table with fields from another table