→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
07-23-2013 09:39 PM
Solved! Go to Solution.
07-24-2013 01:25 PM
08-16-2013 06:19 PM
Select Distinct Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress,
tblAssets.NrProcessors,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets1.AssetName As GuestName,
tblAssets1.Domain As GuestDomain,
tblOperatingsystem.Caption As GuestOS,
tsysAssetTypes1.AssetTypename As GuestType,
tblAssets1.IPAddress As GuestIP,
tblAssets1.NrProcessors As GuestNrProcessors,
tblProcessor.NumberOfCores As GuestCoresPerProcessor
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblVmwareGuest On tblAssets.AssetID = tblVmwareGuest.AssetID
Inner Join tblVmwareGuestNetwork On tblVmwareGuest.GuestID =
tblVmwareGuestNetwork.GuestID
Inner Join tblAssetMacAddress On tblAssetMacAddress.Mac =
tblVmwareGuestNetwork.MacAddress
Inner Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblAssetMacAddress.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysAssetTypes tsysAssetTypes1 On tsysAssetTypes1.AssetType =
tblAssets1.Assettype
Left Join tblProcessor On tblAssets1.AssetID = tblProcessor.AssetID
Left Join tblOperatingsystem On tblOperatingsystem.AssetID = tblAssets1.AssetID
Where tblAssetCustom.State = 1
Order By tblAssets.AssetName,
GuestName
Select Distinct Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress,
tblAssets.NrProcessors,
tblProcessor.NumberOfCores,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets1.AssetName As GuestName,
tblAssets1.Domain As GuestDomain,
tblOperatingsystem.Caption As GuestOS,
tsysAssetTypes1.AssetTypename As GuestType,
tblAssets1.IPAddress As GuestIP,
tblAssets1.NrProcessors As GuestNrProcessors,
tblProcessor1.NumberOfCores As GuestNumberOfCores
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblHyperVGuest On tblAssets.AssetID = tblHyperVGuest.AssetID
Inner Join TblHyperVGuestNetwork On tblHyperVGuest.hypervguestID =
TblHyperVGuestNetwork.HyperVGuestID
Inner Join tblAssetMacAddress On tblAssetMacAddress.Mac =
TblHyperVGuestNetwork.MacAddress
Inner Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblAssetMacAddress.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysAssetTypes tsysAssetTypes1 On tsysAssetTypes1.AssetType =
tblAssets1.Assettype
Inner Join tblProcessor On tblAssets.AssetID = tblProcessor.AssetID
Left Join tblProcessor tblProcessor1 On tblAssets1.AssetID =
tblProcessor1.AssetID
Left Join tblOperatingsystem On tblOperatingsystem.AssetID = tblAssets1.AssetID
Where tblAssetCustom.State = 1
Order By tblAssets.AssetName,
GuestName
08-14-2013 11:18 PM
08-14-2013 06:02 PM
Select Distinct Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress,
tblAssets.NrProcessors,
tblProcessor.NumberOfCores,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets1.AssetName As GuestName,
tblAssets1.Domain As GuestDomain,
tsysOS.OSname As GuestOS,
tsysAssetTypes1.AssetTypename As GuestType,
tblAssets1.IPAddress As GuestIP,
tblAssets1.NrProcessors As GuestNrProcessors,
tblProcessor1.NumberOfCores As GuestNumberOfCores,
tblSerialnumber.Product,
Count(tblSerialnumber.SerialID) As KeyCount
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblHyperVGuest On tblAssets.AssetID = tblHyperVGuest.AssetID
Inner Join TblHyperVGuestNetwork On tblHyperVGuest.hypervguestID =
TblHyperVGuestNetwork.HyperVGuestID
Inner Join tblAssetMacAddress On tblAssetMacAddress.Mac =
TblHyperVGuestNetwork.MacAddress
Inner Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblAssetMacAddress.AssetID
Left Join tblSerialnumber On tblAssets1.AssetID = tblSerialnumber.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysAssetTypes tsysAssetTypes1 On tsysAssetTypes1.AssetType =
tblAssets1.Assettype
Inner Join tblProcessor On tblAssets.AssetID = tblProcessor.AssetID
Left Join tblProcessor tblProcessor1 On tblAssets1.AssetID =
tblProcessor1.AssetID
Left Join tsysOS On tsysOS.OScode = tblAssets1.OScode
Where tblAssetCustom.State = 1
Group By tsysAssetTypes.AssetTypeIcon10,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tblAssets.IPAddress,
tblAssets.NrProcessors,
tblProcessor.NumberOfCores,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets1.AssetName,
tblAssets1.Domain,
tsysOS.OSname,
tsysAssetTypes1.AssetTypename,
tblAssets1.IPAddress,
tblAssets1.NrProcessors,
tblProcessor1.NumberOfCores,
tblSerialnumber.Product
Order By tblAssets.AssetName,
GuestName,
tblSerialnumber.Product
08-14-2013 05:41 PM
08-13-2013 07:57 PM
08-13-2013 07:49 PM
08-14-2013 04:29 PM
techieanalyst wrote:
Can the query be written to include all Hosts and VMs?
Select Distinct Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename As Type,
tblAssets.IPAddress,
tblAssets.NrProcessors,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets1.AssetName As GuestName,
tblAssets1.Domain As GuestDomain,
tsysOS.OSname As GuestOS,
tsysAssetTypes1.AssetTypename As GuestType,
tblAssets1.IPAddress As GuestIP,
tblAssets1.NrProcessors As GuestNrProcessors,
tblProcessor.NumberOfCores As GuestCoresPerProcessor,
tblSerialnumber.Product,
Count(tblSerialnumber.SerialID) As KeyCount
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblVmwareGuest On tblAssets.AssetID = tblVmwareGuest.AssetID
Inner Join tblVmwareGuestNetwork On tblVmwareGuest.GuestID =
tblVmwareGuestNetwork.GuestID
Inner Join tblAssetMacAddress On tblAssetMacAddress.Mac =
tblVmwareGuestNetwork.MacAddress
Inner Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblAssetMacAddress.AssetID
Left Join tblSerialnumber On tblAssets1.AssetID = tblSerialnumber.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysAssetTypes tsysAssetTypes1 On tsysAssetTypes1.AssetType =
tblAssets1.Assettype
Left Join tblProcessor On tblAssets1.AssetID = tblProcessor.AssetID
Left Join tsysOS On tsysOS.OScode = tblAssets1.OScode
Where tblAssetCustom.State = 1
Group By tsysAssetTypes.AssetTypeIcon10,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tblAssets.IPAddress,
tblAssets.NrProcessors,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets1.AssetName,
tblAssets1.Domain,
tsysOS.OSname,
tsysAssetTypes1.AssetTypename,
tblAssets1.IPAddress,
tblAssets1.NrProcessors,
tblProcessor.NumberOfCores,
tblSerialnumber.Product
Order By tblAssets.AssetName,
GuestName,
tblSerialnumber.Product
08-09-2013 09:17 PM
08-09-2013 07:45 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now