→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
‎08-19-2015 04:30 PM
Solved! Go to Solution.
‎08-21-2015 04:22 PM
Select Top 1000000 tsysIPLocations.IPLocation As IPLocation,
tblAssetCustom.AssetID,
tblAssets.AssetUnique,
tblAssetCustom.Manufacturer As Vendor,
tblAssetCustom.Model,
tblAssets.IPAddress,
tsysOS.OSname,
tblAssets.Memory,
Case When tblAssetCustom.Model Like '%virtual%' Then 'virtual' Else 'physical'
End As VirtualCheck,
VMWare.Hostname As [VMware Host],
HyperV.Hostname As [HyperV Host],
tblAssets.Uptime
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Left Join (Select Top 1000000 tblAssetMacAddress.AssetID,
tblAssets1.AssetName As Hostname
From tblAssetMacAddress
Left Join tblVmwareGuestNetwork On tblVmwareGuestNetwork.MacAddress =
tblAssetMacAddress.Mac
Left Join tblVmwareGuest On tblVmwareGuest.GuestID =
tblVmwareGuestNetwork.GuestID
Left Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblVmwareGuest.AssetID
Where tblAssets1.AssetName Is Not Null) VMWare On VMWare.AssetID =
tblAssets.AssetID
Left Join (Select Top 1000000 tblAssetMacAddress.AssetID,
tblAssets1.AssetName As Hostname
From tblAssetMacAddress
Left Join TblHyperVGuestNetwork On TblHyperVGuestNetwork.MacAddress =
tblAssetMacAddress.Mac
Left Join tblHyperVGuest On tblHyperVGuest.hypervguestID =
TblHyperVGuestNetwork.HyperVGuestID
Left Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblHyperVGuest.AssetID
Where tblAssets1.AssetName Is Not Null) HyperV On HyperV.AssetID =
tblAssets.AssetID
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where tblAssetCustom.State = 1 And tblComputersystem.Domainrole > 1
‎08-21-2015 04:22 PM
Select Top 1000000 tsysIPLocations.IPLocation As IPLocation,
tblAssetCustom.AssetID,
tblAssets.AssetUnique,
tblAssetCustom.Manufacturer As Vendor,
tblAssetCustom.Model,
tblAssets.IPAddress,
tsysOS.OSname,
tblAssets.Memory,
Case When tblAssetCustom.Model Like '%virtual%' Then 'virtual' Else 'physical'
End As VirtualCheck,
VMWare.Hostname As [VMware Host],
HyperV.Hostname As [HyperV Host],
tblAssets.Uptime
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Left Join (Select Top 1000000 tblAssetMacAddress.AssetID,
tblAssets1.AssetName As Hostname
From tblAssetMacAddress
Left Join tblVmwareGuestNetwork On tblVmwareGuestNetwork.MacAddress =
tblAssetMacAddress.Mac
Left Join tblVmwareGuest On tblVmwareGuest.GuestID =
tblVmwareGuestNetwork.GuestID
Left Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblVmwareGuest.AssetID
Where tblAssets1.AssetName Is Not Null) VMWare On VMWare.AssetID =
tblAssets.AssetID
Left Join (Select Top 1000000 tblAssetMacAddress.AssetID,
tblAssets1.AssetName As Hostname
From tblAssetMacAddress
Left Join TblHyperVGuestNetwork On TblHyperVGuestNetwork.MacAddress =
tblAssetMacAddress.Mac
Left Join tblHyperVGuest On tblHyperVGuest.hypervguestID =
TblHyperVGuestNetwork.HyperVGuestID
Left Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblHyperVGuest.AssetID
Where tblAssets1.AssetName Is Not Null) HyperV On HyperV.AssetID =
tblAssets.AssetID
Left Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Where tblAssetCustom.State = 1 And tblComputersystem.Domainrole > 1
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now