Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id D0AE44763C2 for ; Mon, 17 Jun 2002 11:10:16 -0400 (EDT) Received: from ashtonwoodshomes.com (unknown [216.94.125.242]) by postgresql.org (Postfix) with ESMTP id 602A84761B3 for ; Mon, 17 Jun 2002 10:36:47 -0400 (EDT) Received: from greatgulfhomes.com. (IDENT:root@[216.191.203.109]) by ashtonwoodshomes.com (8.11.6/8.11.6) with ESMTP id g5HEXrU17516 for ; Mon, 17 Jun 2002 10:33:53 -0400 Received: from terrynew2 (firewall.development.greatgulfhomes.com [216.191.203.106]) by greatgulfhomes.com. (8.11.6/8.11.6) with SMTP id g5HEYSj32390 for ; Mon, 17 Jun 2002 10:34:28 -0400 From: terry@greatgulfhomes.com To: "Postgres (E-mail)" Subject: Make update query appear as a select Date: Mon, 17 Jun 2002 10:33:11 -0400 Message-ID: <003f01c2160b$e8ae8d00$2766f30a@development.greatgulfhomes.com> 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 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Importance: Normal X-Archive-Number: 200206/24 X-Sequence-Number: 1399 I need to do either an update, or insert. Rather then get a lock, get a recordcount, and then perform an UPDATE/INSERT based on the result of my count, I was hoping to just do the update, and if nothing happened then I know I need to do an insert... So, the application is written in ColdFusion, and someone suggested doing this: UPDATE user_recent_list SET access_stamp = now() WHERE user_id = '#variables.local_user_id#' AND app_name = '#variables.local_app_name#'; SELECT @@rowcount as rows_updated; But this part: SELECT @@rowcount as rows_updated; Does not work on Postgres. Does anyone know what the equivalent statement is for Postgres? Thanks Terry Fielder Network Engineer Great Gulf Homes / Ashton Woods Homes terry@greatgulfhomes.com