computer science & engineering 2111 cse 2111 lecture basic criteria in queries 1cse 2111...
Post on 24-Dec-2015
214 Views
Preview:
TRANSCRIPT
1
Computer Science & Engineering 2111
Computer Science & Engineering 2111
CSE 2111 LectureBasic Criteria in Queries
CSE 2111 Lecture-Basic Criteria in Queries
2
Write a query to list the First Name and Last Name and state for all clients who live in Ohio.
Field FirstName LastName State
Table Client Client Client
Sort
Show x x x
Criteria “oh”
OR
OR
Query Name: Ohio Residents Tables Required: ClientForeign Keys: None Join Type: None
When typing in non-numeric criteria, always surround the criteria with quotes.
CSE 2111 Lecture-Basic Criteria in Queries
The data table
The resulting dynaset
CSE 2111 Lecture-Basic Criteria in Queries 3
4
Write a query to list the ClientID for all payments of $100.
Field ClientID Amount
Table Payments Payments
Sort
Show x
Criteria 100
OR
OR
Query Name: PaymentOf100 Tables Required: PaymentsForeign Keys: None Join Type: None
When typing in numeric criteria, DO NOT surround the criteria with quotes.
CSE 2111 Lecture-Basic Criteria in Queries
The data table
The resulting dynaset
CSE 2111 Lecture-Basic Criteria in Queries 5
6
Write a query to list the Client ID, payment, and payment date for all payments made on March 8, 2008.
Field ClientID Amount PaymentDate
Table Payments Payments Payments
Sort
Show x x x
Criteria #3/8/2008#
OR
OR
Query Name: March8 Tables Required: PaymentsForeign Keys: None Join Type: None
When typing in date criteria, always surround the criteria with #.
CSE 2111 Lecture-Basic Criteria in Queries
The data table
The resulting dynaset
CSE 2111 Lecture-Basic Criteria in Queries 7
8
Write a query to list the ClientID and payment for all payments of $100 or more.
Field ClientID Amount
Table Payments Payments
Sort
Show x x
Criteria >=100
OR
OR
Query Name: Payment>=100 Tables Required: PaymentsForeign Keys: None Join Type: None
When typing in numeric criteria, DO NOT surround the criteria with quotes.
CSE 2111 Lecture-Basic Criteria in Queries
The data table
The resulting dynaset
CSE 2111 Lecture-Basic Criteria in Queries 9
top related