Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Selecting rows based on Timestamp column
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rockstar283
Yak Posting Veteran

96 Posts

Posted - 11/18/2013 :  17:40:52  Show Profile  Reply with Quote
I have source and target tables, both having Timestamp column in them. I would like to select all the rows from Source table which have higher Timestamp than max(Target_Timestamp). As it is a timestamp column, I am having problems with this. Can anyone please help me. Thank you!!

Lamprey
Flowing Fount of Yak Knowledge

4614 Posts

Posted - 11/18/2013 :  17:48:19  Show Profile  Reply with Quote
The data type is TIMESTAMP or is it a datetime "timestamp?"

If the data type is TIMESTAMP, then I don't think you can guarantee that the next value in the sequence is Larger.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 11/19/2013 :  01:33:24  Show Profile  Reply with Quote
timestamp has no relationship with date or time. Its just a rowversion info which is added by sql server.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000