pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: DalTech - Continuing Technical Education <CTE@Dal.Ca>
To: Paul McGarry <paulm@opentec.com.au>
Cc: Pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: MAX() of 0 records.
Date: Fri, 7 Jul 2000 09:44:53 -0300
Message-ID: <005601bfe811$263a3460$5911be86@cte.Dal.Ca> (raw)
References: <396535EF.8132CF80@opentec.com.au>

> 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





view thread (18+ messages)  latest in thread

Message-ID: <005601bfe811$263a3460$5911be86@cte.Dal.Ca>
Permalink:  ../005601bfe811$263a3460$5911be86@cte.Dal.Ca/
Also on:    postgresql.org/message-id/005601bfe811$263a3460$5911be86@cte.Dal.Ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: CTE@Dal.Ca, paulm@opentec.com.au
  Subject: Re: MAX() of 0 records.
  In-Reply-To: <005601bfe811$263a3460$5911be86@cte.Dal.Ca>
  References: <396535EF.8132CF80@opentec.com.au> <005601bfe811$263a3460$5911be86@cte.Dal.Ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox