Topics Search

logical operators in a query

logical operators in a query
Views: 9
I am using the below expression in an update query:

iif((
([tblItemMaster]![RuleMet1] = "Yes" AND [tblItemMaster]![RuleMet2] = "No")
OR ([tblItemMaster]![RuleMet1] = "No" AND [tblItemMaster]![RuleMet2] = "Yes")
[tblItemMaster]![ItemQualified] ="No", "")

I have records in tblItemMaster that meet the criteria:
([tblItemMaster]![RuleMet1] = "Yes" AND [tblItemMaster]![RuleMet2] = "No")
OR
([tblItemMaster]![RuleMet1] = "No" AND [tblItemMaster]![RuleMet2] = "Yes")

However [ItemQualified] does not get updated to "No" in tblItemMaster.

I am not sure if I used correct syntax for logical operators
Sponsored Links:

Similar posts...

 

Logical Operators in Access SQL

Logical Operators in Access SQL Icon
Originally, logical operators were a concept from algebra used to exclude and include number sets. They are, very simply, NOT, AND, and OR. Sometimes this set is expanded to combinations of the operators, but at core it's only these three. The logical operators are often referred to as the Boolean operators.
 

Table of operators

Table of operators Icon
An operator is a sign or symbol that specifies the type of calculation to perform within an expression. There are mathematical, comparison, logical, and reference operators. Access supports a variety of operators, including arithmetic operators such as +, -, multiply (*), and divide (/), in addition to comparison operators for comparing values, text operators for concatenating text, and logical operators for determining true or false values. This article provides details about using these operators.
 

Query Criteria In Access 2010 Through Logical Operators

Query Criteria In Access 2010 Through Logical Operators Icon
As the name implies, Query pulls out specific data from table fields included in database, thus, setting specific criterion in query helps you to filter down the table field data according to your needs. Through simple logical operators in Query Criteria you can set a criteria by using simple AND/OR operators, which lets you to confine the results of a query based upon the query criteria to check which table field data is to be included.
 

Exploring Data Analysis

Exploring Data Analysis Icon
To further enhance your filtering capabilities, you can use Boolean algebra combined with the operators we have used so far. Besides the logical operators we know already, Boolean algebra adds extra operators used to concatenate expression.
 

Database Operators and Operands

Database Operators and Operands Icon
The fields we have been using allow the user to enter, view, or change data of a database. Because there is so many types of values a user can be ask to deal with, the values in the fields are categorized by types. Learn: Overview of Operators and Operands, Constants, Operators, Logical Operators.
 

How to Query a Table using Wildcards.

How to Query a Table using Wildcards. Icon
Access wildcards are special operators which allow you to process and retrieve data from a database. These special characters or operators can be used when you want to perform a query that does not contain precise values or contains and unknown element. E.g. To search for a name of students last names that begin with Joh and end with son, you can use this wildcard operators to retrieve the required result.
 

Data analysis: Querying a Database

Data analysis: Querying a Database Icon
To query the records of a database, you can use Boolean algebra combined with some operators. Boolean Algebra works on logical statements. A statement is a sentence that acknowledges a fact or a possibility. That fact is eventually evaluated as being true or false.
 

Techniques of Data Analysis

Techniques of Data Analysis Icon
Data analysis consists of examining the records of a table, an already existing query, or a form, to isolate records that respond to one or more criteria. To assist you with this, Microsoft Access provides all the (visual) tools you need. These include filtering by form and logical junction operators.
 

Database Conditional Values

Database Conditional Values Icon
A value is referred to as Boolean when it is either true or false. In other words, the value only be one or the other, never both, and not any other value. To support Boolean values, Microsoft Access provides a data type named Boolean.
Learning Objective: Boolean Values, Logical Constants, Logical Operations, Logical Functions, Value Checking Functions, Logical Comparisons.
 

Details on Creating Queries

Details on Creating Queries Icon
In this tutorial you will learn about creating queries. Topics: Details on Column Selection, Introduction to Logical Operators and Pattern Operator: LIKE.
 
Sponsored Links: