→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎01-20-2017 05:42 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Custom9 As [PP Label],
tsysAssetTypes.AssetTypeIcon10 As icon,
tsysAssetRelationTypes.Name,
tblAssetRelations.Comments As [Switch Port],
tblAssetCustom.Custom8 As [Outlet Room],
tblAssetCustom.Custom10 As [Outlet Number]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Inner Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetRelations.Type
Where tblAssets.AssetName Like '%111%' And tblAssetCustom.State = 1
‎03-18-2021 07:51 PM
‎01-30-2017 03:58 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Custom9 As [PP Label],
tsysAssetTypes.AssetTypeIcon10 As icon,
tsysAssetRelationTypes.Name,
tblAssetRelations.Comments As [Switch Port],
tblAssetCustom.Custom8 As [Outlet Room],
tblAssetCustom.Custom10 As [Outlet Number],
tblAssets1.AssetName As [Asset In Relation With]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Inner Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetRelations.Type
Inner Join tblAssets tblAssets1 On tblAssetRelations.ChildAssetID =
tblAssets1.AssetID
Where tblAssets.AssetName Like '%111%' And tblAssetCustom.State = 1
Select Distinct Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
SubQuery.NetworkInterface,
SubQuery.IPAddress,
SubQuery.MACaddress,
SubQuery.Switch,
SubQuery.Port,
SubQuery.Description,
SubQuery.Name,
tblAssets.Lasttried,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Left Join (Select Top 1000000 tblAssetMacAddress.AssetID,
tblNetwork.Description As NetworkInterface,
tblNetwork.IPAddress,
tblNetwork.MACaddress,
tblAssets1.AssetName As Switch,
tblSNMPAssetMac.IfIndex As Port,
tblSNMPInfo.IfDescription As Description,
tblSNMPInfo.ifName As Name
From tblAssetMacAddress
Inner Join tblSNMPAssetMac On tblSNMPAssetMac.AssetMacAddress =
tblAssetMacAddress.Mac
Inner Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblSNMPAssetMac.AssetID
Inner Join tblNetwork On tblNetwork.AssetID = tblAssetMacAddress.AssetID And
tblNetwork.MACaddress = tblSNMPAssetMac.AssetMacAddress
Inner Join tblSNMPInfo On tblSNMPInfo.IfIndex = tblSNMPAssetMac.IfIndex And
tblSNMPInfo.AssetID = tblSNMPAssetMac.AssetID
Where tblNetwork.IPEnabled = 1) SubQuery On SubQuery.AssetID =
tblAssets.AssetID
Where tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now