Thread: Oracle greatest() and nvl() equivalent?

Oracle greatest() and nvl() equivalent?

From
Petter Reinholdtsen
Date:
I have the following SQL construct from Oracle.  How do I express this 
in PostgreSQL 6.5?
 SELECT greatest(nvl(max(when_updated),0),                 nvl(max(when_inserted),0),
nvl(max(when_marked_for_delete),0))  FROM source_table;
 

I'm not on this list.  Please cc replies to me.
-- 
##>  Petter Reinholdtsen <##    | pere@td.org.uit.noO-  <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/    | Go Mozilla, go! Go!