→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎07-16-2021 05:04 PM
Solved! Go to Solution.
‎07-16-2021 08:35 PM
CASE
WHEN tsysOS.OSname = 'Win 7' THEN Replace(tblOperatingsystem.Caption, 'Microsoft Windows 7 ', '')
WHEN tsysOS.OSname = 'Win 8' THEN Replace(tblOperatingsystem.Caption, 'Microsoft Windows 8 ', '')
WHEN tsysOS.OSname = 'Win 8.1' THEN Replace(tblOperatingsystem.Caption, 'Microsoft Windows 8.1 ', '')
WHEN tsysOS.OSname = 'Win 10' THEN Replace(tblOperatingsystem.Caption, 'Microsoft Windows 10 ', '')
ELSE tblOperatingsystem.Caption
END AS [OS Version],
Replace(Replace(Replace(Replace(Replace(tblOperatingsystem.Caption, 'Microsoft Windows ', ''), '10 ', ''), '7 ', ''), '8 ', ''), '8.1 ', '') As [OS Version],
/* 5 */ Replace(
/* 4 */ Replace(
/* 3 */ Replace(
/* 2 */ Replace(
/* 1 */ Replace(tblOperatingsystem.Caption, 'Microsoft Windows ', '')
/* 2 */ , '10 ', '')
/* 3 */ , '7 ', '')
/* 4 */ , '8 ', '')
/* 5 */ , '8.1 ', '') As [OS Version],
‎07-16-2021 09:19 PM
‎07-16-2021 08:35 PM
CASE
WHEN tsysOS.OSname = 'Win 7' THEN Replace(tblOperatingsystem.Caption, 'Microsoft Windows 7 ', '')
WHEN tsysOS.OSname = 'Win 8' THEN Replace(tblOperatingsystem.Caption, 'Microsoft Windows 8 ', '')
WHEN tsysOS.OSname = 'Win 8.1' THEN Replace(tblOperatingsystem.Caption, 'Microsoft Windows 8.1 ', '')
WHEN tsysOS.OSname = 'Win 10' THEN Replace(tblOperatingsystem.Caption, 'Microsoft Windows 10 ', '')
ELSE tblOperatingsystem.Caption
END AS [OS Version],
Replace(Replace(Replace(Replace(Replace(tblOperatingsystem.Caption, 'Microsoft Windows ', ''), '10 ', ''), '7 ', ''), '8 ', ''), '8.1 ', '') As [OS Version],
/* 5 */ Replace(
/* 4 */ Replace(
/* 3 */ Replace(
/* 2 */ Replace(
/* 1 */ Replace(tblOperatingsystem.Caption, 'Microsoft Windows ', '')
/* 2 */ , '10 ', '')
/* 3 */ , '7 ', '')
/* 4 */ , '8 ', '')
/* 5 */ , '8.1 ', '') As [OS Version],
‎07-16-2021 07:33 PM
‎07-16-2021 07:04 PM
Select Top 1000000
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tsysOS.OSname As [OS Name],
Replace(tblOperatingsystem.Caption, 'Microsoft Windows 10 ', '') As [OS Version],
tblAssets.Lastseen
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblSystemEnclosure On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On tblSystemEnclosure.ChassisTypes = TsysChassisTypes.Chassistype
Inner Join tblPortableBattery On tblAssets.AssetID = tblPortableBattery.AssetID
Inner Join lansweeperdb.dbo.tblOperatingsystem On tblAssets.AssetID = tblOperatingsystem.AssetID
Where
tblAssets.Lastseen <> ''
And tblAssetCustom.State = 1
And tblAssets.Assettype = -1
Order By
tblAssets.AssetName
‎07-16-2021 06:54 PM
‎07-16-2021 06:30 PM
Replace(tblOperatingsystem.Caption, 'Microsoft Windows 10 ', '') As [OS Version],
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now