Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6A488475902 for ; Wed, 14 Aug 2002 09:21:06 -0400 (EDT) Received: from mps2.plala.or.jp (mpsb-nat02.plala.or.jp [202.212.114.145]) by postgresql.org (Postfix) with ESMTP id CF0634754A8 for ; Wed, 14 Aug 2002 09:21:04 -0400 (EDT) Received: from [192.168.0.4] ([218.47.225.244]) by mps2.plala.or.jp with ESMTP id <20020814132108.UUPG1768.mps2.plala.or.jp@[192.168.0.4]>; Wed, 14 Aug 2002 22:21:08 +0900 Date: Wed, 14 Aug 2002 22:21:50 +0900 From: Masaru Sugawara To: "Sugandha Shah" Subject: Re: parser: parse error at or near "$1" Cc: pgsql-sql@postgresql.org In-Reply-To: <026801c2438d$c9466a00$2005a8c0@cybage.com> References: <026801c2438d$c9466a00$2005a8c0@cybage.com> Errors-To: rk73@sea.plala.or.jp Message-Id: <20020814221050.C853.RK73@sea.plala.or.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.05.03 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/226 X-Sequence-Number: 9072 On Wed, 14 Aug 2002 17:56:16 +0530 "Sugandha Shah" wrote: > -- check for the exact same status string reported > -- previously and skip it if found > > select into last_status top 1 status, last_code status_code from >status_log where schedule_id =schedule_id order by complete_time desc ; PostgreSQL doesn't have a TOP keyword. You'll need to use a LIMIT keyword. See docs. http://www.postgresql.org/idocs/index.php?sql-select.html Regards, Masaru Sugawara