‎09-09-2019 03:26 PM
‎09-09-2019 03:50 PM
Select Top (1000000) SQ.icon,
SQ.AssetID,
SQ.AssetName,
SQ.OS,
SQ.Build,
SQ.[OS Version],
SQ.Domain,
SQ.Username,
SQ.Userdomain,
SQ.IPAddress,
SQ.Description,
SQ.Manufacturer,
SQ.Model,
SQ.Location,
SQ.IPLocation,
SQ.Firstseen,
SQ.Lastseen
From (Select tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysOS.OSname As OS,
tblAssets.OScode + '.' + tblAssets.BuildNumber As Build,
tblAssets.Version As [OS Version],
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen,
Cast(Replace(Replace(Replace(tblAssets.OScode, '.', ''), 'S', ''), 'R',
'') As BIGINT) As OsCodeNumeric,
Cast(tblAssets.BuildNumber As INT) As BuildNumber
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tblAssets.LocationID =
tsysIPLocations.LocationID
Where tsysOS.OSname = 'Win 10' And tblAssetCustom.State = 1 And
tblAssets.BuildNumber Is Not Null) SQ
Cross Join (Select Max(os1.OSCodeNumeric) MaxOsCodeNumeric
From tsysOS os1
Where os1.Sortorder = 18) mo
Cross Join (Select Max(Cast(a.BuildNumber As INT)) MaxBuildNumber
From tblAssets a
Inner Join tsysOS As o On o.OScode = a.OScode
Where o.OSname = 'Win 10' And a.BuildNumber Is Not Null And
Cast(Replace(Replace(Replace(a.OScode, '.', ''), 'S', ''), 'R',
'') As BIGINT) = (Select Max(os2.OSCodeNumeric) From tsysOS os2
Where os2.Sortorder = 18)) mb
Where (SQ.OsCodeNumeric < mo.MaxOsCodeNumeric) Or
(SQ.BuildNumber < mb.MaxBuildNumber)
Order By SQ.AssetName
‎09-09-2019 03:39 PM
‎09-09-2019 04:58 PM
CAP wrote:
Ok, so this is very misleading. If I look at the dashboard, it would appear that 82 systems need 1902, when in fact it is not correct.
How can this be corrected to reflect what is the truth?
‎09-09-2019 03:36 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now