Hello. This is the script I use
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
RTrim(SubString(tblMacOSInfo.ComputerName, CharIndex(' de ',
tblMacOSInfo.ComputerName, 0) + 4, 25)) As Usuario,
tblAssetCustom.Serialnumber,
tsysAssetTypes.AssetTypeIcon10 As icon,
SubString(tblAssetCustom.Model, 0, PatIndex('%[0-9]%', tblAssetCustom.Model))
As Modelo,
RTrim(SubString(tblAssetCustom.Model, PatIndex('%[0-9]%',
tblAssetCustom.Model), 5)) As Version,
Case
When ((SubString(tblAssetCustom.Model, 0, PatIndex('%[0-9]%',
tblAssetCustom.Model)) Like '%iMac%' And
RTrim(SubString(tblAssetCustom.Model, PatIndex('%[0-9]%',
tblAssetCustom.Model), 5)) < '14,1') Or
(SubString(tblAssetCustom.Model, 0, PatIndex('%[0-9]%',
tblAssetCustom.Model)) Like '%Macmini%' And
RTrim(SubString(tblAssetCustom.Model, PatIndex('%[0-9]%',
tblAssetCustom.Model), 5)) < '6,2') Or
(SubString(tblAssetCustom.Model, 0, PatIndex('%[0-9]%',
tblAssetCustom.Model)) Like '%MacPro%' And
RTrim(SubString(tblAssetCustom.Model, PatIndex('%[0-9]%',
tblAssetCustom.Model), 5)) < '6,1') Or
(SubString(tblAssetCustom.Model, 0, PatIndex('%[0-9]%',
tblAssetCustom.Model)) Like '%MacBook%' And
RTrim(SubString(tblAssetCustom.Model, PatIndex('%[0-9]%',
tblAssetCustom.Model), 5)) < '8,1') Or
(SubString(tblAssetCustom.Model, 0, PatIndex('%[0-9]%',
tblAssetCustom.Model)) Like '%MacBookAir%' And
RTrim(SubString(tblAssetCustom.Model, PatIndex('%[0-9]%',
tblAssetCustom.Model), 5)) < '5,2') Or
(SubString(tblAssetCustom.Model, 0, PatIndex('%[0-9]%',
tblAssetCustom.Model)) Like '%MacBookPro%' And
RTrim(SubString(tblAssetCustom.Model, PatIndex('%[0-9]%',
tblAssetCustom.Model), 5)) < '10,2')) Then 'NO'
Else 'SI'
End As [Actualizable (BigSur) ?],
tblMacOSInfo.KernelVersion,
tblMacHwOverview.Memory As [Memoria RAM],
SubString(tblMacPartitions.Size, 0, PatIndex('%G%', tblMacPartitions.Size)) As
Disco,
tblAssets.Processor,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join lansweeperdb.dbo.tblMacOSInfo On tblAssets.AssetID =
tblMacOSInfo.AssetID
Inner Join lansweeperdb.dbo.tblMacHwOverview On tblAssets.AssetID =
tblMacHwOverview.AssetID
Inner Join lansweeperdb.dbo.tblAssetCustom tblAssetCustom1 On
tblAssets.AssetID = tblAssetCustom1.AssetID
Inner Join lansweeperdb.dbo.tblMacPartitions On tblAssets.AssetID =
tblMacPartitions.AssetID
Where tblMacPartitions.MountedOn Like '%/' And tsysAssetTypes.AssetTypename =
'Apple Mac' And tblAssetCustom.State = 1
Order By tblAssets.AssetID,
tblAssets.AssetName