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 LAA54968 for ; Mon, 30 Aug 1999 11:17:27 -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 37C964B4E8; Mon, 30 Aug 1999 18:17:25 +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 AAA39CB; Mon, 30 Aug 1999 18:21:13 +0300 X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: <37C53FD3.8410737A@cyclades.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 30 Aug 1999 18:19:12 +0300 To: Paulo Roberto Kappke , pgsql-sql@postgreSQL.org From: Herouth Maoz Subject: Re: [SQL] Doubts in timespan At 16:23 +0300 on 26/08/1999, Paulo Roberto Kappke wrote: > "UPDATE tasktime SET elapsed_time='age((SELECT inserted_time FROM > tasktime WHERE row=$row),(SELECT inserted_time FROM tasktime WHERE > row=$old_row))' WHERE row=$old_row" If I'm not mistaken, Postgres does not allow subselects to be used in this context. In any case the age function should not be in quotes... Instead, the syntax Postgres uses from the days of old would be something like UPDATE tasktime SET elapsed_time = age( tt.inserted_time, inserted_time ) FROM tasktime tt WHERE row=$old_row AND tt.row = $row; This has nothing to do with timespan. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma