How do I select the max value from multiple tables in one column

Posted by Derick on Stack Overflow See other posts from Stack Overflow or by Derick
Published on 2010-03-18T15:29:06Z Indexed on 2010/03/18 15:31 UTC
Read the original article Hit count: 464

Filed under:
|

I would like to get the last date of records modified. Here is a sample simple SELECT:

SELECT
 t01.name,
 t01.last_upd date1,
 t02.last_upd date2,
 t03.last_upd date3,
 'maxof123' maxdate
FROM
  s_org_ext   t01,  
  s_org_ext_x   t02,   
  s_addr_org   t03   
WHERE
  t02.par_row_id(+)= t01.row_id and
  t03.row_id(+)= t01.pr_addr_id and
  t01.int_org_flg = 'n';

How can I get column maxdate to display the max of the three dates?

Note: no UNION or sub SELECT statements ;)

© Stack Overflow or respective owner

Related posts about sql

Related posts about Oracle