Received: from mail-spool3.eskom.co.za (mail-spool3.eskom.co.za [147.110.49.17]) by postgresql.org (Postfix) with ESMTP id D5C124778C5 for ; Thu, 11 Apr 2002 11:47:59 -0400 (EDT) Received: from eskom.co.za (gw.eskom.co.za [147.110.52.108]) by mail-spool3.eskom.co.za (8.11.5/8.11.5) with ESMTP id g3BHm2q21199 for ; Thu, 11 Apr 2002 17:48:02 GMT Received: from ROUTING-MTA by eskom.co.za with Novell_GroupWise; Thu, 11 Apr 2002 17:48:07 +0200 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.0.1 Date: Thu, 11 Apr 2002 17:48:02 +0200 From: "Richard Ellerbrock" To: Cc: Subject: Re: REPOST: Trouble with SQL conversion Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Archive-Number: 200204/142 X-Sequence-Number: 7407 Ok, now the academic part - why do you have to "GROUP BY" all columns selected? Would one not suffice and have the optimizer figure out the rest? I am no standards guru and have not studied SQL92 or SQL99 so would just like to know. Another inconsistency that I have picked up is with transactions. If I insert a record and violate a primary key (in a transaction block, on both databases) I get an error to the fact - correct. After the error, I am not allowed to do anything, even a select. I am trying to simulate a replace into the database, but using an insert, if failure update does not work. I have worked around this by first trying an update, check the number of affected rows, if zero then insert. This works. So my question: If an insert fails in a transaction is all access dead forever, even selects till the transaction is rolled back or committed? Once again what does the standard say. >>> Christopher Kings-Lynne 2002/04/11 05:36:12 >>> > I am an idiot! Actually your suggestion does work - it would help to do > it against a customer that actually has records! Phew! Lucky that "other" database didn't have one over us, huh? ;) Chris