Received: from Alex2.cte.Dal.Ca (Alex2.cte.Dal.Ca [134.190.17.62]) by hub.org (8.10.1/8.10.1) with ESMTP id e67CktW78054 for ; Fri, 7 Jul 2000 08:46:55 -0400 (EDT) Received: from ghost (Ghost.cte.Dal.Ca [134.190.17.89]) by Alex2.cte.Dal.Ca (8.9.3/8.9.3) with SMTP id JAA16545; Fri, 7 Jul 2000 09:58:46 -0300 Message-ID: <005601bfe811$263a3460$5911be86@cte.Dal.Ca> From: "DalTech - Continuing Technical Education" To: "Paul McGarry" Cc: "Pgsql-sql" References: <396535EF.8132CF80@opentec.com.au> Subject: Re: MAX() of 0 records. Date: Fri, 7 Jul 2000 09:44:53 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200007/77 > UPDATE entry_stats > SET entry_maxprice=MAX(item_price) > FROM item > WHERE item.item_entry_id=NEW.item_entry_id > AND item.item_live = 't'; Try COALESCE(MAX(item_price),0) Christopher J.D. Currie Computer Technician Dalhousie: DalTech - CTE _____________________________________________ Lord, deliver me from the man who never makes a mistake, and also from the man who makes the same mistake twice. -William James Mayo