I am trying to write a script that will get records that have not updated the table in more than 30 minutes.
Example records:
DNS_NAME LAST_PERF_TIME
esxnu01 2013-12-24 12:10:00.000
esxnu02 2013-12-24 12:05:00.000
esxnu01 2013-12-24 12:15:00.000
esxnu03 2013-12-24 12:05:00.000
esxnu04 2013-12-24 12:20:00.000
esxnu02 2013-12-24 12:25:00.000
CREATE TABLE [dbo].[VPX_HOST](
[DNS_NAME] [nvarchar](255) NOT NULL,
[LAST_PERF_TIME] [datetime] NULL)
INSERT INTO [dbo].[VPX_HOST]
([DNS_NAME],[LAST_PERF_TIME])
VALUES
('esxnu01', '2013-12-24 12:10:00.000')
,('esxnu02','2013-12-24 12:05:00.000')
,('esxnu01','2013-12-24 12:15:00.000')
,('esxnu03','2013-12-24 12:05:00.000')
,('esxnu04','2013-12-24 12:20:00.000')
,('esxnu02','2013-12-24 12:25:00.000')