‎02-06-2021 01:14 AM
‎02-08-2021 06:02 PM
‎02-08-2021 04:46 PM
CASE
WHEN CharIndex(' ', tblNetwork.IPAddress) > 0
THEN Left(tblNetwork.IPAddress, CharIndex(' ', tblNetwork.IPAddress)-1)
ELSE tblNetwork.IPAddress
END AS IPv4Address
‎02-08-2021 04:33 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon16) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblDiskdrives.Caption,
Cast(Cast(tblDiskdrives.Freespace As bigint) / 1024 / 1024 / 1024 As
numeric) As FreeGB,
Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 / 1024 As numeric) As
TotalSizeGB,
Floor(Cast(Cast(tblComputersystem.TotalPhysicalMemory As bigint) / 1024 /
1024 As numeric)) As [Total Memory],
tblDiskdrives.Lastchanged
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Outer Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 / 1024 As numeric)
<> 0 And tblState.Statename = 'Active' And tblDiskdrives.DriveType = 3
Order By tblAssets.Domain,
tblAssets.AssetName,
tblDiskdrives.Caption
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now