April 27, 2004 at 4:27 am
I need to run a script to check any open transactions on the database for the last 2 hours. The application has a column called flag set to 'C' when performing updates and inserts that is set to 'N' on completion of a transaction. However, I found some transactions are remaining flagged as 'C' (in limbo land) and I want to know as soon it happens.
I could use the datepart function to build something up but I was hoping someone out there had written something that would perform much better.
April 27, 2004 at 10:02 am
I could have phrased the question a little better me thinks.
I was able to come up with a solution:
I use the
select * from mytable where datediff(mi,create_datetime,getdate()) < 120
I thought that one og the real techies out there would be able to answer this. I am very disappointed in you all. Tsh tsh.
April 27, 2004 at 11:21 am
Sorry, too busy to do much in the forums yesterday.
Glad you came up with the answer.
April 28, 2004 at 12:50 am
Ha, I dont even get to work till noon, sorry but most of my reading and answering takes place during the late evenings...
Place a question at 10:00 PM, I'll respond within the hour or not, I look for the more Challenging Questions...
Coach James
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply