Advertisement

06.13.2008 at 10:45AM PDT, ID: 23483527
[x]
Attachment Details

Need help creating a simple delete statement

Asked by MrManderson in MS SQL Server, SQL Server 2005

Hi all !

I have a table that is updates ever 5 - 10 mins by my application to show connected users. I plan on creating a service to drop old connections to monitor the application. The table structure is as follows

UID uniquieidentifier
UserID int
LastContact datetime
Workstation varchar(100)

How would I go about deleting the record if it older than a given parameter (say 10 minutes) assessing the time against the lastcontact field?

Regards
Steve

Start Free Trial
[+][-]06.13.2008 at 10:51AM PDT, ID: 21781214

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, SQL Server 2005
Sign Up Now!
Solution Provided By: chapmandew
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906