Download presentation
Presentation is loading. Please wait.
Published byKathryn Spencer Modified over 9 years ago
1
Computer Science & Engineering 2111 CSE 2111 Lecture Multiple and Compound Criteria in Queries 1 CSE 2111 Lecture-Multiple and Compound Criteria in Queries
2
Multiple conditions in a Query Boolean Operators - AND, OR For conditions in multiple fields the placement of your arguments determines the Boolean relationship between those arguments If a criteria is on the same line it is automatically considered an AND If a criteria is on a separate line it is automatically considered an OR CSE 2111 Lecture-Multiple and Compound Criteria in Queries 2
3
Write a query to list the First Name, Last Name, and amount for all clients who paid $250 or more or made payments of less than $75. 3 Query Name: Example1Tables Required: Client/Payments Foreign Keys: ClientIDJoin Type:Inner Field FirstNameLastNameAmount Table Client Payments Sort Show xxx Criteria >= 250 OR < 75 OR Query Name: Example2Tables Required: Client/Payments Foreign Keys: ClientIDJoin Type:Inner Field FirstNameLastNameAmount Table Client Payments Sort Show xxx Criteria >= 250 or < 75 OR CSE 2111 Lecture-Multiple and Compound Criteria in Queries
4
The resulting dynaset 4 CSE 2111 Lecture-Multiple and Compound Criteria in Queries The data tables
5
Write a query to list the First Name, Last Name, amount and payment date for all clients who paid more than $100 on or after 3/3/2008. Field FirstNameLastNameAmountPaymentDate Table Client Payments Sort Show xxxx Criteria > 100>= #3/3/2008# OR 5 Query Name:AndExampleTables Required:Client/Payments Foreign Keys:ClientIDJoin Type:Inner CSE 2111 Lecture-Multiple and Compound Criteria in Queries
6
The resulting dynaset CSE 2111 Lecture-Multiple and Compound Criteria in Queries 6 The data tables
7
Write a query to list the First Name and Last Name of all clients who made payments between 1/1/2008 and 3/8/2008. Field FirstNameLastNamePaymentDate Table Client Payments Sort Show xxx Criteria Between #1/1/2008# And #3/8/2008# OR 7 Query Name:BetweenExampleTables Required:Client/Payments Foreign Keys:ClientIDJoin Type:Inner CSE 2111 Lecture-Multiple and Compound Criteria in Queries
8
The resulting dynaset CSE 2111 Lecture-Multiple and Compound Criteria in Queries 8 The data tables
9
Write a query to list the First Name, Last Name, amount and payment date for all clients who paid more than $100 on or after 3/3/2008 or made a payment of $100. Field FirstNameLastNameAmountPaymentDate Table Client Payments Sort Show xxxx Criteria > 100>= #3/3/2008# OR 100 OR 9 Query Name:CompoundExampleTables Required:Client/Payments Foreign Keys:ClientIDJoin Type:Inner CSE 2111 Lecture-Multiple and Compound Criteria in Queries
10
The resulting dynaset CSE 2111 Lecture-Multiple and Compound Criteria in Queries 10 The data tables
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.