Hi,
Here is a sample query which will get the altest of two dates. The table used is employee table on sample database. Hope this helps.
DB2 "WITH TEMP AS (select case when (hiredate > birthdate) then 0 else 1 end as value from employee where empno = '000010') SELECT CASE VALUE WHEN 0 THEN HIREDATE ELSE BIRTHDATE END FROM TEMP,EMPLOYEE WHERE EMPNO='000010'"
Bye
GK