I am thinking of doing something like below to satisfy my requirement.
SELECT
a.number,
CASE WHEN ZEROIFNULL(a.caldate1) > ZEROIFNULL(b.caldate2)
THEN a.caldate1 -- This is working
ELSE
b.caldate2
END AS caldate
/*COALESCE (a.caldate1,caldate2) AS caldate*/ -- This is not giving max of dates
FROM
table1 a
LEFT OUTER JOIN
table2 b
ON
a.number = b.number
Thanks for helping. Now its done by the above method.
Enjoy coding
2010-01-22 04:27:13