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 2005 Forums
 Transact-SQL (2005)
 15 minute time difference

Author  Topic 

chedderslam
Posting Yak Master

223 Posts

Posted - 2010-03-10 : 14:45:49
I need to lock items while users check out with pay pal. If I put a timestamp on a column, how do I select records older than 15 minutes?

Thank you.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-10 : 14:50:14
WHERE SomeDateColumn <= DATEADD(mi, -15, GETDATE())

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

chedderslam
Posting Yak Master

223 Posts

Posted - 2010-03-11 : 09:14:32
Thank you.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-11 : 15:30:17
You're welcome.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -