cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
thomassteffen
Engaged Sweeper
Hello

I have changed a default report to this:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Description,
tblAssetCustom.Building,
tsysOS.Image As icon,
tblAssets.IPAddress,
tblAssetCustom.Model,
tsysOS.OSname,
tblComputersystem.SystemType
From tblComputersystem
Inner Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblComputersystem.Domainrole > 1 And tblAssetCustom.State = 1
Order By tblAssets.AssetName

but now I need also inside this report our ESX server
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Try this:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tblAssets.Description,
tblAssetCustom.Building,
tblAssets.IPAddress,
tblAssetCustom.Model,
tsysOS.OSname,
tblComputersystem.SystemType,
tsysAssetTypes.AssetTypeIcon10 As icon
From tblComputersystem
Right Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where (tblComputersystem.Domainrole > 1 And tblAssetCustom.State = 1) Or
(tsysAssetTypes.AssetTypename Like '%vmware%' And tblAssetCustom.State = 1)
Order By tblAssets.AssetName

View solution in original post

1 REPLY 1
Hemoco
Lansweeper Alumni
Try this:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tblAssets.Description,
tblAssetCustom.Building,
tblAssets.IPAddress,
tblAssetCustom.Model,
tsysOS.OSname,
tblComputersystem.SystemType,
tsysAssetTypes.AssetTypeIcon10 As icon
From tblComputersystem
Right Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where (tblComputersystem.Domainrole > 1 And tblAssetCustom.State = 1) Or
(tsysAssetTypes.AssetTypename Like '%vmware%' And tblAssetCustom.State = 1)
Order By tblAssets.AssetName