Results 1 to 2 of 2

Thread: tSQL Joining Tables

  1. #1
    Kevin Lucas NNTP User

    Default 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.

  2. #2
    Join Date
    Jan 2009
    Location
    Toronto, Ontario
    Posts
    188

    Default Re: tSQL Joining Tables

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •