Table1
ID Date Intime Outtime
A001 20000501 12:00:00 22:00:00
A001 20000502 14:00:00 22:00:00
A001 20000503 12:00:00 23:00:00
A002 20000501 11:00:00 20:00:00
A002 20000502 13:00:00 21:00:00
So on…,
Table2
ID Date Intime Outtime
A001 20050501 14:00:00 23:00:00
A002 20050501 08:00:00 16:00:00
From the above table
I want to take Table1.ID, Table1.Date, Table2.Intime, Table2.Outtime from Table1 Inner Join Table2 on Table1.ID = Table2.ID and Table1.Date = Table2.Date
Getting Duplicated values
ID Date Intime Outtime
A001 20000501 14:00:00 23:00:00
A001 20000501 18:00:00 16:00:00
A002 20000501 14:00:00 23:00:00
A002 20000501 18:00:00 16:00:00
I tried Left outer Join also. It was showing a same. How to compare the id and date.
Need query Help?