Thanks Fabio,
It was a real plesure to look this code. I never think of that. But what if the some dates of table 2 is equal. When I try the code & make two dates equal always some of the table2 records is missing & always that has equal date with other record.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.