Re: MAX() of 0 records. - Mailing list pgsql-sql

From DalTech - Continuing Technical Education
Subject Re: MAX() of 0 records.
Date
Msg-id 005601bfe811$263a3460$5911be86@cte.Dal.Ca
Whole thread Raw
In response to MAX() of 0 records.  (Paul McGarry <paulm@opentec.com.au>)
List pgsql-sql
> 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




pgsql-sql by date:

Previous
From: Paul McGarry
Date:
Subject: Re: MAX() of 0 records.
Next
From: Thomas Swan
Date:
Subject: Altnerate Column Return Names