Rob81don
10-14-2004, 09:33 AM
Hi All,
The problem i've got is that i've got 2 tables with a load of dates in them and the dates are broken down into seconds. I need to do a join on the dates to get records that have a date/time that is within a second of each other.
So for example in table 1 i have a date 14/04/2004 18:00:00
and in table 2 i need to see if there are any matches that are equal to that time or 14/04/2004 18:00:01
I've heard that there is a way by using a star join or something but the below SQL statement doesn't work as it says it can't recognise my table name even though it is definitely correct. :confused:
SELECT PPsuspenseContactExtractMod.BillAccount, PPsuspenseContactExtractMod.Time_Stamp, PPsuspenseMonetaryActivityMod.Time_Stamp
FROM PPsuspenseContactExtractMod INNER JOIN PPsuspenseMonetaryActivityMod ON (PPsuspenseContactExtractMod.Time_Stamp >= PPsuspenseMonetaryActivityMod.Time_Stamp And PPsuspenseContactExtractMod.Time_Stamp < PPsuspenseMonetaryActivityMod.Time_Stamp + #00:00:01#);
Can anyone Help?? :D
The problem i've got is that i've got 2 tables with a load of dates in them and the dates are broken down into seconds. I need to do a join on the dates to get records that have a date/time that is within a second of each other.
So for example in table 1 i have a date 14/04/2004 18:00:00
and in table 2 i need to see if there are any matches that are equal to that time or 14/04/2004 18:00:01
I've heard that there is a way by using a star join or something but the below SQL statement doesn't work as it says it can't recognise my table name even though it is definitely correct. :confused:
SELECT PPsuspenseContactExtractMod.BillAccount, PPsuspenseContactExtractMod.Time_Stamp, PPsuspenseMonetaryActivityMod.Time_Stamp
FROM PPsuspenseContactExtractMod INNER JOIN PPsuspenseMonetaryActivityMod ON (PPsuspenseContactExtractMod.Time_Stamp >= PPsuspenseMonetaryActivityMod.Time_Stamp And PPsuspenseContactExtractMod.Time_Stamp < PPsuspenseMonetaryActivityMod.Time_Stamp + #00:00:01#);
Can anyone Help?? :D