Welcome to Forums Sign in | Join | Help | Forums
in Search


Querying to Exclude Multiple Attributes

Last post 12-30-2009 2:04 PM by Christine McGee. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-11-2009 10:41 AM

    Querying to Exclude Multiple Attributes

     

    I am trying to create a query that will result in records WITHOUT specific attributes that could be on their records.  Because these records have more attributes which are not one of the attributes I don't want, they are being included.  I have tried using the operators 'does not contain' and 'not one of', but I get the same results.  Any suggestions?  Thank you.
    Filed under:
  • 11-11-2009 11:58 AM In reply to

    • Kate McGuinness
    • Top 500 Contributor
    • Posts 21
    • Organization: Diabetes Research Institute Foundation, Inc.

    Re: Querying to Exclude Multiple Attributes

    i JUST DID THIS RECENTLY AND CAN SEND YOU A CONTROL REPORT directly to your email.  Please send your email if you are interested.

  • 11-12-2009 9:26 AM In reply to

    Re: Querying to Exclude Multiple Attributes

    Hi Kate - I just sent you a private email, but not sure if it worked.  Please let me know - thank you!

  • 12-30-2009 2:04 PM In reply to

    Re: Querying to Exclude Multiple Attributes

    I've found that creating two separate queries (one for the "Inclusions" and the other for "Exclusions") then merging them together with the SUB operator to be helpful and helps me keep things straighter in my mind.

    The first query (i.e. your Primary) would list all of your criteria, including the one line for the attributes you do want: attribute (category or description) equal to (or one of) and then select your values. Don't worry that this group will include some records you don't want. Ultimately you can subtract those records out using the merge function.

    Next query (i.e. Secondary) would be pretty simple criteria to group all of the records you want to exclude from your first query. Keep the operators positive: attributes equal to (or one of) and then select the attribute (category or descriptions) that you don't want. In my experience, since both queries are positive they run faster.

    After saving the two queries (I like to add "Inclusions" and "Exclusions to the query titles) click on the "Merge Queries" function on the toolbar. Enter your Primary query first, then your Secondary. Choose SUB as the operator. The end result will be a Static query and none of the records in the secondary query will show up in your end result. The merge function subtracts them out for you.

    I'm sure there's also Knowledgebase Solutions on Merging using the SUB operator, etc...

     

      

    Filed under:
Page 1 of 1 (4 items)