Hi .
Here is a sample data Plan Name Payroll date Historty cd aaa 2012-01-01 1 bbb 2012-02-02 2 bbb 2012-03-03 2 Plan Name Payroll date lfycd aaa 2012-01-01 1 bbb 2012-02-02 2 bbb 2012-03-03 x I need to join these 2 tables and get the max payolldate date record that matches Which means i need to get the latest payoll date of the tables that should have matching in both these tables sample o/p should like the below for plan bbb bbb 2012-0303 2 X Regards Ron ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html