1 Reply Latest reply on Mar 6, 2013 10:45 PM by jking

    Query Question

    mitch_reid

      Hi, another question.  I have this in a query:

       

      where="(where(and(doesNotHaveTag EPOLeafNode.AppliedTags 17)(doesNotHaveTag EPOLeafNode.AppliedTags 18)(hasTag EPOLeafNode.AppliedTags 162)))"

       

      It works fine returning machines with the Tag ID of 162 and NOT either tag of 17 or 18.  I would also like to change the where statement to include machines with tag 162 or 163. I cant seem to get the syntax correct. So (exclude machines with tags 17 or 18) and (have tag 162 or 163)

       

      Thanks  

        • 1. Re: Query Question
          jking

          Try this...

           

          where="

          (where

              (and

                  (doesNotHaveTag EPOLeafNode.AppliedTags 17)

                  (doesNotHaveTag EPOLeafNode.AppliedTags 18)

                  (or

                      (hasTag EPOLeafNode.AppliedTags 162)

                      (hasTag EPOLeafNode.AppliedTags 163)

                  )

              )

          )"

           

          Except no white space etc.