tSQL Joining Tables

Hi All,

I’ve got two tables in a MSSQL database that I need to join on a time/date
stamp (YYYY-MM-DD HH:MM:SS) however the two time stamps are of by about 10
seconds. I’ve tried using Transaction_Header.ProcessDate LIKE
SerialNumberDetail.SaleDate but when I Transaction_Header.ProcessDate
is ‘2009-09-02 09:33:49.560’ and SerialNumberDetail.SaleDate ‘2009-09-02
09:34:00.000’ I’m not getting a match.

Any ideas?

Thanks in advance.


kev.

Kevin Lucas wrote:

> Hi All,
>
> I’ve got two tables in a MSSQL database that I need to join on a time/date
> stamp (YYYY-MM-DD HH:MM:SS) however the two time stamps are of by about 10
> seconds. I’ve tried using Transaction_Header.ProcessDate LIKE
> SerialNumberDetail.SaleDate but when I Transaction_Header.ProcessDate
> is ‘2009-09-02 09:33:49.560’ and SerialNumberDetail.SaleDate ‘2009-09-02
> 09:34:00.000’ I’m not getting a match.
>
> Any ideas?
>
> Thanks in advance.
>
> –
> kev.

Well for the record this ended up resolved as User = Putz. There was
another more sensible field to join the tables on that I had simply
overlooked.

kev.