And, Or, In...

Understanding "and / or"


At times it will be necessary to use an "or" rather than "and". For example if you are searching for more than one vehicle model, more than one city, postal code etc. Anytime this occurs as part of your query ensure you are using parentheses to follow the correct order of operations to give you the correct results.


Example:

(Model is like Silverado or Model is like Sierra) and Deal Date <= 01/01/2008 and Deal Date is <=12/31/2012


This statement will complete the operation within the parentheses first, followed by completing the rest of the search, meaning it will find all Silverados or Sierras first that indeed have a Deal Date between the date range specified. Remember to place parentheses (brackets) around your "or" statement before clicking Search.


'IN' Operator

What if we needed to check for certain values only? Values that do not always fit into a neat range. To accommodate this, DealerMine now allows the use of the IN operator which is directly related to the Where clause. When used in this context, we know exactly the value of the returned values we want to see for at least one of the columns.

This statement will return the records where column1 is value1, value2. The number of values in the parenthesis can be one or more, and they can be numerical or characters.