|
-
SQL> select * from t1 ;
ID EFF_DATE
---------- ---------
100 05-JUL-03
100 08-AUG-03
100 10-SEP-03
200
300 08-MAY-01
SQL>
1 select id, max(eff_date) last_eff_date,
2 decode(max(eff_date), null,null , add_months(max(eff_date),24))
3 from t1
4* group by id;
ID LAST_EFF_ DECODE(MA
---------- --------- ---------
100 10-SEP-03 10-SEP-05
200
300 08-MAY-01 08-MAY-03
Is this you want?
Tamil
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|