→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
‎12-03-2015 01:49 AM
error while getting report
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value
error while getting report
Conversion failed when converting date and/or time from character string.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
Convert(datetime,(SubString(tblRegistry.Value, 1,
10))) As [Last Install Date],
Convert(datetime,(SubString(tblRegistry1.Value, 1,
10))) As [Last Download Date]
From tblAssets
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Inner Join tblRegistry tblRegistry1 On tblAssets.AssetID =
tblRegistry1.AssetID
Where Convert(datetime,(SubString(tblRegistry.Value, 1, 10))) > GetDate() - 60
And tblRegistry.Valuename Like '%LastS%' And tblRegistry.Regkey Like
'%Install' And tblRegistry1.Regkey Like '%Download%' And tblAssets.Assettype =
-1
Select Top 1000000 tblAssets.AssetID As AssetID1,
tblAssets.AssetName,
tblQuickFixEngineeringUni.HotFixID,
tblQuickFixEngineeringUni.Description,
Max(tblQuickFixEngineering.InstalledOn)
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID =
tblAssetGroupLink.AssetGroupID
Inner Join tblQuickFixEngineering On tblAssets.AssetID =
tblQuickFixEngineering.AssetID
Inner Join tblQuickFixEngineeringUni On tblQuickFixEngineeringUni.QFEID =
tblQuickFixEngineering.QFEID,
tsysOS
Where tblAssetCustom.State = 1
Group By tblAssets.AssetID,
tblAssets.AssetName
Order By tblAssets.AssetName,
Max(tblQuickFixEngineering.InstalledOn) Desc
Solved! Go to Solution.
‎12-04-2015 01:28 PM
‎12-07-2015 08:28 PM
‎12-04-2015 11:00 PM
‎12-04-2015 01:28 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now