‎05-13-2014 12:02 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As Equipo,
tblADusers.Name As Usuario,
tblRegistry.Regkey As [Clave de registro x32 & x64],
tblRegistry.Value As [Antivirus fecha],
tblAssets.Lasttried
tblAssets.Lasttriggered
From tblAssets
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblADusers On tblADusers.Username = tblAssets.Username
Where tblAssets.AssetName Not Like 'SR%' And tblRegistry.Regkey Like '%AVEngine'
And tblAssets.Assettype = -1 And tblAssetCustom.State = 1
Order By [Antivirus fecha]
Solved! Go to Solution.
‎05-13-2014 07:59 PM
CONVERT(DateTime, field_containing_date_as_text, 101)
DateDiff( d,
CONVERT(DateTime, field_containing_date_as_text, 101),
GetDate() )
DateDiff( d,
CONVERT(DateTime, field_containing_date_as_text, 101),
GetDate() ) > 30
‎05-16-2014 03:47 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As Equipo,
tblADusers.Name As Usuario,
tblRegistry.Regkey As [Clave de registro x32 & x64],
tblRegistry.Value As [Antivirus fecha],
tblAssets.Lasttried As [Inventario a 1],
tblAssets.Lasttriggered As [Inventario a 2]
From tblAssets
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblADusers On tblADusers.Username = tblAssets.Username
Where tblAssets.AssetName Not Like 'SR%' And tblRegistry.Regkey Like '%AVEngine'
And tblAssets.Assettype = -1 And tblAssetCustom.State = 1 And
DateDiff(d, Convert(DateTime,tblRegistry.Value,101), GetDate()) > 30
Order By [Antivirus fecha]
‎05-13-2014 07:59 PM
CONVERT(DateTime, field_containing_date_as_text, 101)
DateDiff( d,
CONVERT(DateTime, field_containing_date_as_text, 101),
GetDate() )
DateDiff( d,
CONVERT(DateTime, field_containing_date_as_text, 101),
GetDate() ) > 30
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now