‎05-04-2015 11:59 AM
Select Top 1000000 tblAssets_1.AssetID,
tblAssets_1.AssetName,
tblAssets_1.Domain,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblBIOS.SMBIOSBIOSVersion As CurrentBios,
Bios.biosMax As LatestBios,
Case When tblBIOS.SMBIOSBIOSVersion = Bios.biosMax Then 'black' Else 'red'
End As foregroundcolor,
tsysOS.Image As icon
From tblAssets As tblAssets_1
Inner Join tblBIOS On tblAssets_1.AssetID = tblBIOS.AssetID
Inner Join tblAssetCustom On tblAssets_1.AssetID = tblAssetCustom.AssetID
Inner Join (Select tblAssetCustom_1.Manufacturer,
tblAssetCustom_1.Model,
Max(tblBIOS_1.SMBIOSBIOSVersion) As biosMax
From tblAssets
Inner Join tblAssetCustom As tblAssetCustom_1 On tblAssets.AssetID =
tblAssetCustom_1.AssetID
Inner Join tblBIOS As tblBIOS_1 On tblAssets.AssetID = tblBIOS_1.AssetID
Where tblAssetCustom_1.Model Not Like 'VirtualBox' And
tblAssetCustom_1.Model Not Like 'VMware Virtual Platform' And
tblAssetCustom_1.Model Not Like 'Virtual Machine'
Group By tblAssetCustom_1.Manufacturer,
tblAssetCustom_1.Model) As Bios On tblAssetCustom.Model = Bios.Model And
tblAssetCustom.Manufacturer = Bios.Manufacturer And
tblBIOS.SMBIOSBIOSVersion <> Bios.biosMax
Inner Join tsysOS On tsysOS.OScode = tblAssets_1.OScode
Where tblBIOS.SMBIOSBIOSVersion <> Bios.biosMax And tblAssetCustom.State = 1
Order By tblAssets_1.AssetName
‎08-24-2018 12:41 PM
zdlease wrote:
This query works great, with the exception that there's an issue with the newer Dell BIOS naming scheme (Axx versions work fine).
I believe the issue is with the version comparison, most likely due to it being a string comparison. The current example I have is a Latitude where BIOS version 1.16.4 is installed, however the report is showing there is a newer update of 1.9.4, which is not accurate.
I'm not a SQL expert by far, any thoughts for overcoming this issue?
‎04-30-2018 09:51 PM
zdlease wrote:
This query works great, with the exception that there's an issue with the newer Dell BIOS naming scheme (Axx versions work fine).
I believe the issue is with the version comparison, most likely due to it being a string comparison. The current example I have is a Latitude where BIOS version 1.16.4 is installed, however the report is showing there is a newer update of 1.9.4, which is not accurate.
I'm not a SQL expert by far, any thoughts for overcoming this issue?
‎09-15-2015 01:01 PM
‎09-09-2015 05:53 PM
Daniel.B wrote:
Group By tblAssetCustom_1.Manufacturer,
tblAssetCustom_1.Model) As Bios On tblAssetCustom.Model = Bios.Model And
tblAssetCustom.Manufacturer = Bios.Manufacturer And
tblBIOS.SMBIOSBIOSVersion <> Bios.biosMax And tblBIOS.SMBIOSBIOSVersion <>
Bios.biosMax
Select Top 1000000 tblAssets_1.AssetID,
tblAssets_1.AssetName,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblBIOS.SMBIOSBIOSVersion As CurrentBios,
Bios.biosMax As LatestBios,
Case When tblBIOS.SMBIOSBIOSVersion = Bios.biosMax Then 'black' Else 'red'
End As foregroundcolor,
tsysOS.Image As icon
From tblAssets As tblAssets_1
Inner Join tblBIOS On tblAssets_1.AssetID = tblBIOS.AssetID
Inner Join tblAssetCustom On tblAssets_1.AssetID = tblAssetCustom.AssetID
Inner Join (Select tblAssetCustom_1.Manufacturer,
tblAssetCustom_1.Model,
Max(tblBIOS_1.SMBIOSBIOSVersion) As biosMax
From tblAssets
Inner Join tblAssetCustom As tblAssetCustom_1 On tblAssets.AssetID =
tblAssetCustom_1.AssetID
Inner Join tblBIOS As tblBIOS_1 On tblAssets.AssetID = tblBIOS_1.AssetID
Where tblAssetCustom_1.Model Not Like 'VirtualBox' And
tblAssetCustom_1.Model Not Like 'VMware Virtual Platform' And
tblAssetCustom_1.Model Not Like 'Virtual Machine'
Group By tblAssetCustom_1.Manufacturer,
tblAssetCustom_1.Model) As Bios On tblAssetCustom.Model = Bios.Model And
tblAssetCustom.Manufacturer = Bios.Manufacturer
Inner Join tsysOS On tsysOS.OScode = tblAssets_1.OScode
Where tblAssetCustom.State = 1
Order By tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets_1.AssetName
‎08-19-2015 06:46 PM
‎08-21-2015 04:36 PM
studerje wrote:
I like this. The only modification I made was to only show devices that are active.
tblAssetCustom.State = 1
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now