Received: from mx99.openu.ac.il (arbel.openu.ac.il [147.233.32.4]) by hub.org (8.9.3/8.9.3) with ESMTP id FAA62976 for ; Mon, 28 Jun 1999 05:12:14 -0400 (EDT) (envelope-from herouth@oumail.openu.ac.il) Received: from talmon.openu.ac.il (talmon.openu.ac.il [147.233.32.11]) by mx99.openu.ac.il (Postfix) with ESMTP for id 9203C4B5B6; Mon, 28 Jun 1999 12:12:11 +0300 (IDT) Received: from [147.233.159.109] (mac-herouth.pc.openu.ac.il) by talmon.openu.ac.il (Netscape Messaging Server 3.54) with ESMTP id AAA25A3; Mon, 28 Jun 1999 12:15:05 +0300 X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: <377731EB.AACAEA8B@thinx.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 28 Jun 1999 12:13:49 +0300 To: Christian Rudow , PostgreSQL SQL From: Herouth Maoz Subject: Re: [SQL] Using Update At 11:27 +0300 on 28/06/1999, Christian Rudow wrote: > I just seem to use the UPDATE not correctly, it cannot be parsed. > What is the correct solution to this ? > Can anyone help ? > > I know that's a RTFM but I have no FM to R. > Is there a good SQL tutorial/reference accessible over the net ? The usual FM is recommended. That is, the PostgreSQL user guide, which comes with the software, if you compile it from source. Can't guarantee that it comes with rpms. You can also man (postgres comes with manpages). And you can also do a "\h update" in psql, to get the bare-bones syntax. From the manpage: SYNOPSIS update classname set attname-1 = expression-1 [, attname-i = expression-i] [from from-list] [where qual] So, it appears that the correct syntax in Postgres would be: UPDATE b SET b.a_id = a.aid FROM a WHERE b.custno = a.custno; Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma