FUZZY TME and DATE JOIN.
DaveyBJan 14 2009 — edited Jan 14 2009I have two tables its a one to many relationship from TableA to TableB.
What I am wanting to know is which time is the closest in Table_B to the time in comparison to Table_A based upon the UID.
I have documented two examples tables as stated below and an example output. I know this at first glance appears arbitary but its an actual problem on two tables I am working on. It appears to be some form of clock drift.
Thanks
Table_A
UID Date_Time_A
1111 14/01/2009 08:00:01
1112 14/01/2009 09:05:32
Table_B
UID Date_Time_B
1111 14/01/2009 08:00:00
1111 14/01/2009 08:03:01
1111 14/01/2009 08:10:02
1112 14/01/2009 09:04:00
1112 14/01/2009 09:05:30
1112 14/01/2009 09:06:00
OUTPUT
UID Date_Time_A Date_Time_B
1111 14/01/2009 08:00:01 1111 14/01/2009 08:00:00
1112 14/01/2009 09:05:32 1112 14/01/2009 09:05:30