Results 1 to 3 of 3

Thread: Multiple OR Operators

  1. #1
    Join Date
    Jan 2008
    Posts
    2

    Multiple OR Operators

    Can some one please tell me why the below where clause with Multiple OR operators does not work??. OR can suggest the best way to do this


    WHERE ((([Hardship details].[Date Commenced]) Between [Enter Start Date:] And [Enter End Date:])) AND (DECISION = "YES" Or Decision = "No" OR Decision = "Progress");

    Is this the right way to use AND as well as multiple OR operator in the same query?

    Rajesh
    Last edited by rrao; 01-17-2008 at 09:09 PM.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    What are you trying to achieve. For the statement you have provided, if the date commenced is not within the given range then it will not return anything even if decision column matches with any of the OR condition.

    Please post sample data and result you want to get.

  3. #3
    Join Date
    Jan 2008
    Posts
    2

    Multiple OR

    I have used a parameter query. When the query is run, the user will be asked to input the start and end dates. This part of the query works fine.

    my problem is comparing the data range (using AND) with the result of the OR condition.

    Raj

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •