Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group