→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
05-26-2015 06:57 PM
Solved! Go to Solution.
05-28-2015 03:10 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblOperatingsystem.Caption As OS,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.Processor,
tblAssets.Domain,
tblADComputers.Description As [AD description],
Cast(Cast(tDiskdrives.Freespace As bigint) / 1024 / 1024 / 1024 As Numeric) As
[Sum diskdrive free space],
Cast(Cast(tDiskdrives.Size As bigint) / 1024 / 1024 / 1024 As Numeric) As
[Sum diskdrive size],
tblState.Statename As State,
tsysIPLocations.IPLocation,
tblAssetCustom.Location,
tVMwareHost.AssetName As [VMware host],
tblAssetCustom.Serialnumber,
tblAssets.Uptime,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Left Join tblOperatingsystem On tblAssets.AssetID = tblOperatingsystem.AssetID
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join (Select tblDiskdrives.AssetID,
Sum(tblDiskdrives.Freespace) As Freespace,
Sum(tblDiskdrives.Size) As Size
From tblDiskdrives
Where tblDiskdrives.DriveType = 3
Group By tblDiskdrives.AssetID) tDiskdrives On tblAssets.AssetID =
tDiskdrives.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Left Join tsysIPLocations
On tblAssets.IPNumeric Between tsysIPLocations.StartIP And
tsysIPLocations.EndIP
Left Join tblVmwareGuestNetwork
On tblAssets.Mac = tblVmwareGuestNetwork.MacAddress
Left Join tblVmwareGuest On tblVmwareGuestNetwork.GuestID =
tblVmwareGuest.GuestID
Left Join tblAssets tVMwareHost On tVMwareHost.AssetID =
tblVmwareGuest.AssetID
Order By tblAssets.AssetName
05-28-2015 03:53 PM
05-28-2015 03:10 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblOperatingsystem.Caption As OS,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.Processor,
tblAssets.Domain,
tblADComputers.Description As [AD description],
Cast(Cast(tDiskdrives.Freespace As bigint) / 1024 / 1024 / 1024 As Numeric) As
[Sum diskdrive free space],
Cast(Cast(tDiskdrives.Size As bigint) / 1024 / 1024 / 1024 As Numeric) As
[Sum diskdrive size],
tblState.Statename As State,
tsysIPLocations.IPLocation,
tblAssetCustom.Location,
tVMwareHost.AssetName As [VMware host],
tblAssetCustom.Serialnumber,
tblAssets.Uptime,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Left Join tblOperatingsystem On tblAssets.AssetID = tblOperatingsystem.AssetID
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join (Select tblDiskdrives.AssetID,
Sum(tblDiskdrives.Freespace) As Freespace,
Sum(tblDiskdrives.Size) As Size
From tblDiskdrives
Where tblDiskdrives.DriveType = 3
Group By tblDiskdrives.AssetID) tDiskdrives On tblAssets.AssetID =
tDiskdrives.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Left Join tsysIPLocations
On tblAssets.IPNumeric Between tsysIPLocations.StartIP And
tsysIPLocations.EndIP
Left Join tblVmwareGuestNetwork
On tblAssets.Mac = tblVmwareGuestNetwork.MacAddress
Left Join tblVmwareGuest On tblVmwareGuestNetwork.GuestID =
tblVmwareGuest.GuestID
Left Join tblAssets tVMwareHost On tVMwareHost.AssetID =
tblVmwareGuest.AssetID
Order By tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now