Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7KFDAP51828 for ; Mon, 20 Aug 2001 11:13:10 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 105060; Mon, 20 Aug 2001 08:13:05 -0700 From: "Josh Berkus" Subject: Re: Simple SQL-syntax To: "Fredrik Thunberg" , X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Mon, 20 Aug 2001 08:13:05 -0700 Message-ID: In-Reply-To: <01a501c12969$6e397a10$7100000a@intern.datessa.se> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_===105060====davinci.ethosmedia.com===_" X-Archive-Number: 200108/247 X-Sequence-Number: 4486 This is a multi-part MIME message --_===105060====davinci.ethosmedia.com===_ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Fredrik, > I have a very simple sql-question from an sql-beginner: Sure. Keep in mind that there is a pgsql-newbie list. Also quite a few good books on the topic, including: Database Design for Mere Mortals and SQL for Smarties. > Then I want to change all occurences of NrA in Table A to NrB... > > I've tried: > UPDATE tableA Set tableA.nrA = B.nrB From tableB B Where tableA.nrA = B.nrA; This should work. What error message are you getting? And what version of Postgres are you using? -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco --_===105060====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===105060====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===105060====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===105060====davinci.ethosmedia.com===_--