Client Management Suite

 View Only
  • 1.  Filters not working as expected

    Posted Feb 04, 2015 05:27 PM

    Hi guys, I am trying to create a simple dymanic filer based on computer name.  I used the query builder and it is pulling in more results than I want.

    Want to filter by name starting with DEN.

    Have my query setup as Computer including Windows Workstations

    Query_0.PNG

    Added a Parameter with value DEN%

    Parameter.PNG

    And set the filter to use it.

    Filter.PNG

    Am getting computers that's name do not start with DEN and ones that start with DEN.  HELP.  :)

    Thanks

    Ash

     



  • 2.  RE: Filters not working as expected
    Best Answer

    Broadcom Employee
    Posted Feb 05, 2015 06:06 AM

    Hi,

    try this SQL query which will automatically show only managed endpoints, which name contains "DEN"

    • Create a new filter in "Raw SQL" mode ⇒ specify below SQL Query and save filter ⇒ "Update Membership".
    SELECT
       [vri1_Computer].[Guid] AS [Guid]
    FROM
       [vRM_Computer_Item] AS [vri1_Computer]
          LEFT OUTER JOIN [Inv_AeX_AC_Identification] AS [dca2_AeX AC Identification]
             ON ([vri1_Computer].[Guid] = [dca2_AeX AC Identification].[_ResourceGuid])
          LEFT OUTER JOIN [vRM_Computer_Item] AS [ajs3_vRM_Computer_Item]
             ON ([vri1_Computer].[Guid] = [ajs3_vRM_Computer_Item].[Guid])
    WHERE
       (
          (
             ([ajs3_vRM_Computer_Item].[IsManaged] = 1)
             AND
             (LOWER([dca2_AeX AC Identification].[Name]) LIKE '%' + N'%DEN%' + '%')
          )
       )


  • 3.  RE: Filters not working as expected

    Posted Feb 05, 2015 09:30 AM

    That works great.  Have a couple questions, I am still learning SQL.

    Why does this part need to have all the extra characters in it?  I understand the %DEN% part.

    '%' + N'%DEN%' + '%'

    And, are the AS aliases required or do you just like to use them?

    Thanks a lot for your help.

    Ash



  • 4.  RE: Filters not working as expected

    Broadcom Employee
    Posted Feb 05, 2015 03:15 PM

    As example about extra characters

    http://stackoverflow.com/questions/5263293/sql-server-2005-what-does-the-letter-n-for-where-name-like-nf

    If you're using 7.5 SP1 version, you can create required filter, using UI of Enhanced Console View.

    Check similar thread https://www-secure.symantec.com/connect/forums/how-do-i-create-filter-target-computer-models

    Thanks,

    IP.