UPDATE TableA SET nrA = TableB.nrB WHERE nrA = TableB.nrA;
UPDATE statements don't take FROM clauses. I don't think they like aliasing, either.
----- Original Message -----
From: Fredrik Thunberg
Sent: Monday, August 20, 2001 6:15 AM
Subject: Simple SQL-syntax
I have a very simple sql-question from an sql-beginner:
Suppose I have Table A looking something like this:
Index Text NrA
And Table B like this:
Then I want to change all occurences of NrA in Table A to NrB...
UPDATE tableA Set tableA.nrA = B.nrB From tableB B Where tableA.nrA = B.nrA;
But that doesn't seem to work...
In response to
pgsql-sql by date
|Next:||From: Jean-Christophe Boggio||Date: 2001-08-20 14:51:33|
|Subject: Strange DISTINCT !|
|Previous:||From: Raymond Chui||Date: 2001-08-20 14:08:36|
|Subject: How to execute a system file in procedure?|