→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tux182
Engaged Sweeper
Hi All

I have an asset report that works fairly well
I'm attempting to exclude all servers - mostly VMs and an HP

The 'models' that show that i would like to exclude is 'VMware Virtual Platform' + 'ProLiant DL380 Gen9'

Thanks in advance for any assistance
My existing report looks like this

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblADusers.Displayname,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tblAssets.Processor,
tblAssets.Memory,
Sum(Cast(Cast(tblDiskdrives.Size As BigInt) / 1024 / 1024 / 1024 As Numeric))
As [Total size (GB)],
Sum(Cast(Cast(tblDiskdrives.Freespace As BigInt) / 1024 / 1024 /
1024 As Numeric)) As [Free in GB],
tblVideoController.Caption As [Windows Graphics Card],
tblAssets.IPAddress,
tsysOS.Image As icon,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
Left Join tblADusers On tblADusers.Userdomain = tblAssets.Userdomain
And tblADusers.Username = tblAssets.Username
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Left Join tblVideoController On tblAssets.AssetID = tblVideoController.AssetID
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Where tblAssetCustom.State = 1
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblADusers.Displayname,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblAssets.Processor,
tblAssets.Memory,
tblVideoController.Caption,
tblAssets.IPAddress,
tsysOS.Image,
tblAssets.Lastseen
Order By tblAssets.AssetName
2 REPLIES 2
Esben_D
Lansweeper Employee
Lansweeper Employee
You should be able to add the following to your query:

Where tblAssetCustom.Model Not In ('VMware Virtual Platform',
'ProLiant DL380 Gen9')
tux182
Engaged Sweeper
Charles.X wrote:
You should be able to add the following to your query:

Where tblAssetCustom.Model Not In ('VMware Virtual Platform',
'ProLiant DL380 Gen9')


Thanks. I've popped this into where i think this addition should go - but it seems whereever i pop it in, it moans with
'Invalid SELECT statement. Unexpected token "Where" at line 42, pos 1.: Unexpected token "Where" at line 42, column 1'

With that example being at the end.