Video Screencast Help

modify query to filter on subnet

Created: 19 Feb 2014 • Updated: 20 Feb 2014 | 1 comment
This issue has been solved. See solution.


I was wondering if someone can see the reason why this would not launch. I would want this to be very specific so I would see 1.1.1.x and not 1.1.10.x


SELECT  DISTINCT   vComputer.Name AS 'Computer Name', vComputer.[IP Address], vComputer.[OS Name], vComputer.[OS Revision], vComputer.[System Type], vHWComputerSystem.Manufacturer,
                      vHWComputerSystem.Model, vHWComputerSystem.[Identifying Number] AS 'Serial Number', vHWProcessor.Model AS 'Processor',
                      vHWComputerSystem.[Total Physical Memory (Bytes)] / 1048576 AS 'RAM (MB)', vComputer.[User] AS 'Primary Owner'
FROM         vComputer LEFT OUTER JOIN
                      ResourceAssociation AS loc ON (loc.ChildResourceGuid = vComputer.Guid OR
                      loc.ParentResourceGuid = vComputer.Guid) AND loc.ResourceAssociationTypeGuid = '05DE450F-39EA-4AAE-8C5F-77817889C27C' LEFT OUTER JOIN
                      vItem AS I ON loc.ChildResourceGuid = I.Guid LEFT OUTER JOIN
                      vHWProcessor ON vComputer.Guid = vHWProcessor._ResourceGuid LEFT OUTER JOIN
                      vHWComputerSystem ON vComputer.Guid = vHWComputerSystem._ResourceGuid LEFT OUTER JOIN
                      Inv_Aex_AC_TCPIP ON vComputer.Guid = Inv_Aex_AC_TCPIP._ResourceGuid
WHERE     (vComputer.IsManaged = 1) AND (vComputer.[OS Name] NOT LIKE '%Server%') and (Inv_Aex_AC_TCPIP.[subnet] like '%x.x.x.%')
ORDER BY 'Computer Name'



Operating Systems:

Comments 1 CommentJump to latest comment

SK's picture

Try using = instead of LIKE for the subnet WHERE clause.

Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.