Select Top 1000000 tblAssets.AssetID, tblAssets.AssetName, tblAssets.Domain, tblAssets.Username, tblAssets.Userdomain, Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon, tblAssets.IPAddress, tsysIPLocations.IPLocation, tblAssetCustom.Manufacturer, tblAssetCustom.Model, Coalesce(tblMacOSInfo.SystemVersion, tblIntuneDevice.OsVersion, tblAirWatchDevice.OsVersion) As [OS Version], Case when tblMacOSInfo.SystemVersion like '%11.6%' Then 'Up to date' when tblIntuneDevice.OsVersion like '%14.8%'Then 'Up to date' when tblAirWatchDevice.OsVersion like '%14.8%'Then 'Up to date' when tblMacOSInfo.SystemVersion is NULL Then '' when tblIntuneDevice.OsVersion is NULL Then '' when tblAirWatchDevice.OsVersion is NULL Then '' else 'Out of date' end as [Up/Out of date], Case When tblErrors.ErrorText Is Not Null Or tblErrors.ErrorText != '' Then 'Scanning Error: ' + tsysasseterrortypes.ErrorMsg Else '' End As ScanningErrors, tblAssets.Lastseen, tblAssets.Lasttried, Case when tblMacOSInfo.SystemVersion like '%11.6%' Then '#d4f4be' when tblIntuneDevice.OsVersion like '%14.8%'Then '#d4f4be' when tblAirWatchDevice.OsVersion like '%14.8%'Then '#d4f4be' else '#ffadad' end as backgrondcolor From tblAssets Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID Left Join tblMacOSInfo On tblAssets.AssetID = tblMacOSInfo.AssetID Left Join tblIntuneDevice On tblAssets.AssetID = tblIntuneDevice.AssetId Left Join tblAirWatchDevice On tblAssets.AssetID = tblAirWatchDevice.AssetId Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID Inner Join tblState On tblState.State = tblAssetCustom.State Left Join tsysOS On tsysOS.OScode = tblAssets.OScode Left Join (Select Distinct Top 1000000 tblErrors.AssetID As ID, Max(tblErrors.Teller) As ErrorID From tblErrors Group By tblErrors.AssetID) As ScanningError On tblAssets.AssetID = ScanningError.ID Left Join tblErrors On ScanningError.ErrorID = tblErrors.Teller Left Join tsysasseterrortypes On tsysasseterrortypes.Errortype = tblErrors.ErrorType Where (tblAssetCustom.Manufacturer Like '%Apple%' Or tblAirWatchDevice.Platform Like '%Apple%') And tblState.Statename = 'Active' Order By tblAssets.Domain, tblAssets.AssetName
Explore the full platform, free for 14 days.
No credit card required.