This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Filter Nodes (SQL) Question

Hi there...

I would like to filter out some nodes from showing up in our stock High Percent Utilization report.  At the moment, all nodes show up that are greater than the threshold however we have some genuine nodes that run at 95% of interface speed intentionally.

Not being an expert on SQL by any means, I would like to use a "Filter Nodes (SQL)" statement to report on all nodes *except* for nodes with a name of *map* (map is in middle of their names) OR nodes with a name of *123* for example. 

I can find documentation on LIKE *123 for example but nothing that says "everything but this and this and this".

Thanks,

Paul

  • 1. I am trying to list Top 10 Interfaces which are not bond0 interfaces in this example "Filter Nodes (SQL)": InterfaceName Not Like 'bond0'

    2. The same example when you use regex in "Filter Nodes (SQL)": InterfaceName Not Like '*ond*'

  • My above post was to filter out interfaces, but then from what I understand as per your requirement you don't want to view interfaces related to certain nodes, to achieve this you will have to use the columns available in Interface Table.

    As per your requirement -> " I would like to use a "Filter Nodes (SQL)" statement to report on all nodes *except* for nodes with a name of *map* (map is in middle of their names) OR nodes with a name of *123* for example. " You can use the below filters:

    1. FullName Not Like '*map*'

    2. FullName Not Like '*123*'

    FullName will contain node name+ interface name under Interfaces Table, hence the above filters will work as expected.

    Hope this helps, let me know how it goes.

  • If its Report Writer that you are taking about - create a Advanced SQL report to extract the same report and use the below query:

    Note: MODIFY THE SELECT query accordingly. The below query is just an example

    SELECT

    Nodes.Caption AS NodeName, Interfaces.Caption AS Interface_Caption, Interfaces.HighPercentUtil AS High_Percent_Utilization

    FROM

    Nodes INNER JOIN Interfaces ON (Nodes.NodeID = Interfaces.NodeID)

    WHERE 

    (

      (Nodes.Caption NOT LIKE '%map%')

    )

  • Thanks very much - that's what I needed!

  • One last question - what's the proper OR statement if I want to do a series of them?

    Example:

    FullName Not Like '*map*' OR FullName Not Like '*123*'


    This is incorrect - trying to find out how to join multiple OR statements together


    Thanks again!

  • this is always true

    e.g.:

    123 is not like '*map*' or 123 is not like '*123*' = true or false = true

    map is not like '*map*' or map is not like '*123*' = false or true  = true

    EITHER

    123 is not like '*map*' AND 123 is not like '*123*' = true AND false = false

    map is not like '*map*' AND map is not like '*123*' = false AND true  = false

    OR

    NOT ( 123 is like '*map*' or 123 is like '*123*' ) = not( true or false) = false

    NOT ( map is like '*map*' or map is like '*123*' ) = not( true or false) = false

  • I realise this is an old post, but I am having similar issues.  I would to show all nodes that don't contain the words "BMS".  I have used the following SQL, but it status the syntax is incorrect.  Please can you help.

    FullName Not Like '*BMS*'

  • the SQL wildcard character is a '%', not a '*'

    try

    FullName Not Like '%BMS%'