Received: from mail.utexas.edu (wb1-a.mail.utexas.edu [128.83.126.134]) by postgresql.org (8.11.3/8.11.4) with SMTP id f7KErNP43934 for ; Mon, 20 Aug 2001 10:53:23 -0400 (EDT) (envelope-from webmaster@robbyslaughter.com) Received: (qmail 6611 invoked by uid 0); 20 Aug 2001 14:53:18 -0000 Received: from adsl-64-218-161-124.dsl.austtx.swbell.net (HELO robmanbox) (64.218.161.124) by umbs-smtp-1 with SMTP; 20 Aug 2001 14:53:18 -0000 Reply-To: From: "Robby Slaughter" To: "Fredrik Thunberg" , Subject: RE: Simple SQL-syntax Date: Mon, 20 Aug 2001 09:55:47 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <01a501c12969$6e397a10$7100000a@intern.datessa.se> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200108/249 X-Sequence-Number: 4487 Fredrik, Just for future reference, it's generally a good idea to include a complete table schema and some sample data for your tables when asking this kind of question. But I think I know what you mean and will try to help you. >Suppose I have Table A looking something like this: >Index Text NrA >And Table B like this: >NrA NrB >Then I want to change all occurences of NrA in Table A to NrB... First of all, your syntax isn't quite right. It's UPDATE tablename SET value = value WHERE [conditions]; There's no FROM clause in an update statement. And second, you need to be careful to make sure all your tokens make sense. You had an extra "B" in the middle of your statement. Based on this: UPDATE tableA,tableB SET tableA.NrA = tableB.NrB WHERE tableA.NrA = tableB.NrB should achieve the desired result. Hope this helps! -Robby Slaughter