openSUSE Forums > Programming/Scripting » tSQL Joining Tables

Go Back   openSUSE Forums > Programming/Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


Programming/Scripting Questions about programming, bash scripts, perl, php, cron jobs, ruby, python, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-Sep-2009, 18:18
Kevin Lucas
Guest
 
Posts: n/a
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.
Reply With Quote
  #2 (permalink)  
Old 09-Sep-2009, 13:25
yu210148's Avatar
Explorer Penguin
 
Join Date: Jan 2009
Location: Toronto, Ontario
Posts: 154
yu210148 hasn't been rated much yet
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.
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2