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

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Selecting rows based on Timestamp column

Author  Topic 

rockstar283
Yak Posting Veteran

96 Posts

Posted - 2013-11-18 : 17:40:52
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
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2013-11-18 : 17:48:19
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

52326 Posts

Posted - 2013-11-19 : 01:33:24
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
   

- Advertisement -