SlideShare a Scribd company logo
AIN102 Access Query Design P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com
AIN102 Contact Information Admissions AIN102  Module 1 P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com [email_address]   Copyright 2001-20011 All rights reserved.
AIN102 Notes This course is based on an earlier course, SQL200A, which was focused on using SQL in the Access environment. As such the screenshots still reflect SQL view as well the Query Designer view. This is actually a plus. Admissions AIN102  Module 1
AIN102 Resources Manuals can be downloaded from SlideShare. Slides can be viewed on SlideShare… http://www.slideshare.net/OCDatabases   Admissions AIN102  Module 1
AIN102 Access Query Design Module  1 – Relational Database Background, Basic Single Table Retrieval Operations
AIN102 Session 1 – Review of Relational Databases and Single Table Retrieval, Functions and Operators Session 2 – Multi-table retrieval, Subqueries, Unions, Action Queries, Indexes AIN102  Module 1 Admissions AIN102  Module 1
AIN102 Lecture/discussion with demonstrations Mostly practical, but a dose of “theory” Assumes some familiarity with MS Access Hands-on Exercises  (Mostly cumulative) About 3 hours per module AIN102  Module 1 Admissions AIN102  Module 1
Module 1 Concepts Relational databases SQL Access Query Designer SELECT Query Basic Filter criteria Complex criteria AIN102  Module 1 Admissions AIN102  Module 1 Field Operations Functions Operators Calculated fields Concatenation
Microsoft Access Query Design Course focus is Microsoft Access Query Design Queries are widely used for: Database administration Enterprise application development Data driven web sites Retrieving and modifying data in MS Access databases A foundation skill for eBusiness and almost all major business applications that use relational databases AIN102  Module 1 Admissions AIN102  Module 1
Access Query Design and SQL Class database will be MS Access – the SQL engine Access uses is called JET A basic knowledge of Access is assumed Focus of this class will be on the query designer, with SQL used from time-to-time to explain concepts AIN102  Module 1 Admissions AIN102  Module 1
Relational Database Basics Storage Databases Tables Rows Columns Indexes Views SQL interface AIN102  Module 1 Admissions AIN102  Module 1
Storage In Access one file with extension mdb or accdb. I.e  mydatabase.accdb . Database splitter can be used to split it into two parts – a front end and a back end. Interface to physical storage via the “JET” database engine. This is the behind-the scenes-workhorse.  AIN102  Module 1 Admissions AIN102  Module 1
Databases In the Access world refers to all objects stored in the mdb. Tables Queries From Reports Macros Code modules AIN102  Module 1 Admissions AIN102  Module 1
AIN102  Module 1 Admissions AIN102  Module 1 Relational Database Table
AIN102  Module 1 Admissions AIN102  Module 1 Sample Access Database
AIN102  Module 1 Admissions AIN102  Module 1 Database Relationships
Approaching Query Design Try to build queries a step at a time Save existing queries that are working as you like; modify them with a new name when building a modified query Try looking at the generated SQL code from time-to-time AIN102  Module 1 Admissions AIN102  Module 1
Query Types Select Action Update Delete Insert Maketable Special use queries Crosstab Data Definition Language (DDL) Union SQL pass-through AIN102  Module 1 Admissions AIN102  Module 1
DDL Data definition language (DDL) to create and modify tables, etc. Create, alter, drop, etc. Must be “hand-coded” in Access But can be useful for database administration Done in MS Access via SQL Specific Queries – Will not be covered in the course AIN102  Module 1 Admissions AIN102  Module 1
MS Access DDL Queries AIN102  Module 1 Admissions AIN102  Module 1
DCL Data Control Language (DCL) to control user rights, etc. Grant Revoke Constraints Used primarily in enterprise databases Can be done in Access but not covered in this course AIN102  Module 1 Admissions AIN102  Module 1
DML Data Manipulation Language (DML) Select Query Append Query Update Query Delete Query Maketable Query (a special type of Select) Union Query (really combined Selects) MS Access Query Designer will create these statements “behind the scenes” AIN102  Module 1 Admissions AIN102  Module 1
MS Access Action Queries AIN102  Module 1 Admissions AIN102  Module 1
Other Access Queries Crosstab Pass Through – used to pass an SQL statement directly to a back end database w/out processing by Access AIN102  Module 1 Admissions AIN102  Module 1
Sample Database Before we continue… Load the sample database if you haven’t already AIN102  Module 1 Admissions AIN102  Module 1
Query Designer AIN102  Module 1 Admissions AIN102  Module 1 Right click anywhere for SQL View Double click or drag to add a field Double click to add a table
SELECT Queries AIN102  Module 1 Admissions AIN102  Module 1 Basic Syntax: Select  column-list  or * From  table-list *  Means all columns
MS Access SELECT Query AIN102  Module 1 Admissions AIN102  Module 1 Drag and Drop or double click
MS Access SELECT SQL AIN102  Module 1 Admissions AIN102  Module 1
AIN102  Module 1 Admissions AIN102  Module 1 Simple Select Query Results
SELECT w/ Where AIN102  Module 1 Admissions AIN102  Module 1 Filters retrieved rows Syntax: SELECT  column-list FROM  table-list WHERE  selection-criteria
Comparison Operators < less than > greater than <= less than or equal >= greater than or equal = equal <> not equal Admissions AIN102  Module 1
SELECT w/ WHERE AIN102  Module 1 Admissions AIN102  Module 1
SELECT w/ WHERE AIN102  Module 1 Admissions AIN102  Module 1
SELECT w/ WHERE Results AIN102  Module 1 Admissions AIN102  Module 1
Complex Filters AIN102  Module 1 Admissions AIN102  Module 1 Follows normal boolean logic Select PatID, LastName, etc… From patients Where (LastName = “Thomas”  or  birthdate < #1/1/95#)  and  city = “Corona”)
Complex Filter AIN102  Module 1 Admissions AIN102  Module 1 AND
Select w/ Complex Where AIN102  Module 1 Admissions AIN102  Module 1
Complex Filter Results AIN102  Module 1 Admissions AIN102  Module 1
Special Operators LIKE IN BETWEEN IS NULL AIN102  Module 1 Admissions AIN102  Module 1
Like (“Wild Card Matches”) Where customer_last_name like “Jo*” *= string of characters Where customer_last_name like “Jo?” ? = exactly one character AIN102  Module 1 Admissions AIN102  Module 1 Access actually allows more sophisticated Unix style search patterns as well – see help.
LIKE AIN102  Module 1 Admissions AIN102  Module 1 Names ending in “S”
LIKE AIN102  Module 1 Admissions AIN102  Module 1 Names ending in “S”
LIKE Results AIN102  Module 1 Admissions AIN102  Module 1
IS NULL AIN102  Module 1 Admissions AIN102  Module 1 Select  columnns From clients Where zip  IS NULL SQL (including JET) uses three valued logic. Must use IS NULL to test for unknowns. A null is NOT the same as blank or empty.
IS NULL AIN102  Module 1 Admissions AIN102  Module 1
IS NULL AIN102  Module 1 Admissions AIN102  Module 1
IS NULL Results AIN102  Module 1 Admissions AIN102  Module 1 OK. Now try finding all patients with a blank address. Was the above row retrieved? Why or why not?
IN AIN102  Module 1 Admissions AIN102  Module 1 Select * From patients Where lastname  IN  (“Smith”, “Thomas”, “Juarez”) Note: what is inside parentheses is a list. Later we will replace the list with a subquery which generates the list items.
IN AIN102  Module 1 Admissions AIN102  Module 1
IN AIN102  Module 1 Admissions AIN102  Module 1 List of values
SELECT w/in IN Results AIN102  Module 1 Admissions AIN102  Module 1
BETWEEN AIN102  Module 1 Admissions AIN102  Module 1 SELECT * FROM admissions WHERE admit_date  BETWEEN  #10/1/2001# and #12/31/2001# Note: between is inclusive
BETWEEN AIN102  Module 1 Admissions AIN102  Module 1
BETWEEN Results AIN102  Module 1 Admissions AIN102  Module 1
Removing Duplicates AIN102  Module 1 Admissions AIN102  Module 1 SELECT  DISTINCT  PatNo FROM admissions List once each employee who has a labor ticket Removes duplicate rows from result set
DISTINCT AIN102  Module 1 Admissions AIN102  Module 1
Distinct Results AIN102  Module 1 Admissions AIN102  Module 1 W/out Distinct With Distinct
Sorting – ORDER BY AIN102  Module 1 Admissions AIN102  Module 1 DESC will sort in descending order Basic syntax : SELECT  column list FROM  table list WHERE  selection criteria ORDER BY   column list   [DESC]
Sorting – ORDER BY AIN102  Module 1 Admissions AIN102  Module 1 Select * From patients Where state in(“CA”, “OR”, “WA”) Order by  birthdate  desc Example: List patients in Pacific Coast sorted by youngest to oldest
Sorting – ORDER BY AIN102  Module 1 Admissions AIN102  Module 1 Note: modify the “select_in” query
Sorting – ORDER BY AIN102  Module 1 Admissions AIN102  Module 1
Sorting – Results AIN102  Module 1 Admissions AIN102  Module 1
Query/SQL Exercises List all patient numbers, etc.  for  patients who co-paid more than $20; sort by co-pay amount, largest first List diagnostics that contain b, d, or q in the diagnostic code List the patient id’s for admissions in the fall (Sep, Oct, Nov) of 2001 and 2002 AIN102  Module 1 Admissions AIN102  Module 1
Calculated Fields AIN102  Module 1 Admissions AIN102  Module 1 Example: Select a + b as result Syntax: SELECT  expression  AS  new column name Result is a “column alias”
Calculated Fields AIN102  Module 1 Admissions AIN102  Module 1 New column name Follow name with “:”
Calculated Fields AIN102  Module 1 Admissions AIN102  Module 1
Calculated Fields - Results AIN102  Module 1 Admissions AIN102  Module 1
Concatenation “ Adds” two character fields using “&” symbol Useful for formatting names, addresses, etc. Example: Select firstname & “ “ & lastname as fullname AIN102  Module 1 Admissions AIN102  Module 1
Concatenation AIN102  Module 1 Admissions AIN102  Module 1 Sort, but don’t show
Concatenation AIN102  Module 1 Admissions AIN102  Module 1
Concatenation AIN102  Module 1 Admissions AIN102  Module 1 Single column with full name, sorted by last name Tip:  handy for reports
SQL Exercises List all the patients with a “fullname” field; sorted by last name. Add a calculated field which shows their loaded copay (copay *1.5).  Show the fullname, but not the individual names. AIN102  Module 1 Admissions AIN102  Module 1
End Session 1 AIN102  Module 1 Admissions AIN102  Module 1 Next session : multi-table operations, subqueries, unions, action queries, indexes
Notes Admissions AIN102  Module 1
Notes Admissions AIN102  Module 1
Ad

More Related Content

Viewers also liked (20)

Get database properties using power shell in sql server 2008 techrepublic
Get database properties using power shell in sql server 2008   techrepublicGet database properties using power shell in sql server 2008   techrepublic
Get database properties using power shell in sql server 2008 techrepublic
Kaing Menglieng
 
ITT PROJECT ON CREATE QUERY(QUERY-SELECT WITH CONDITION, MAKE A TABLE,APPEND,...
ITT PROJECT ON CREATE QUERY(QUERY-SELECT WITH CONDITION, MAKE A TABLE,APPEND,...ITT PROJECT ON CREATE QUERY(QUERY-SELECT WITH CONDITION, MAKE A TABLE,APPEND,...
ITT PROJECT ON CREATE QUERY(QUERY-SELECT WITH CONDITION, MAKE A TABLE,APPEND,...
Alok Mishra
 
Network topology
Network topologyNetwork topology
Network topology
Hardik Patel
 
MS-ACCESS:CREATE TAB(QUERY-SELECT WITH CONDITIONS, MAKE A TABLE,DELETE,APPNED...
MS-ACCESS:CREATE TAB(QUERY-SELECT WITH CONDITIONS, MAKE A TABLE,DELETE,APPNED...MS-ACCESS:CREATE TAB(QUERY-SELECT WITH CONDITIONS, MAKE A TABLE,DELETE,APPNED...
MS-ACCESS:CREATE TAB(QUERY-SELECT WITH CONDITIONS, MAKE A TABLE,DELETE,APPNED...
Ashish Saxena
 
Ms access 2010
Ms access 2010Ms access 2010
Ms access 2010
Alsufaacademy
 
How to Create A Microsoft Access 2007 Database
How to Create A Microsoft Access 2007 DatabaseHow to Create A Microsoft Access 2007 Database
How to Create A Microsoft Access 2007 Database
Rebecca Wright-Washington
 
The ABAP Query
The ABAP QueryThe ABAP Query
The ABAP Query
PeterHBrown
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms access
jigeno
 
Teknologi dalam pendidikan
Teknologi dalam pendidikanTeknologi dalam pendidikan
Teknologi dalam pendidikan
Rudy Jemain Rj
 
AIA101.1.MS Access Tables & Data
AIA101.1.MS Access Tables & DataAIA101.1.MS Access Tables & Data
AIA101.1.MS Access Tables & Data
Dan D'Urso
 
AVB202 Intermediate Microsoft Access VBA
AVB202 Intermediate Microsoft Access VBAAVB202 Intermediate Microsoft Access VBA
AVB202 Intermediate Microsoft Access VBA
Dan D'Urso
 
Terranova Brochure
Terranova BrochureTerranova Brochure
Terranova Brochure
elsearles
 
Link Journalism: Curation to increase trust, relevance, brevity and pageviews
Link Journalism: Curation to increase trust, relevance, brevity and pageviewsLink Journalism: Curation to increase trust, relevance, brevity and pageviews
Link Journalism: Curation to increase trust, relevance, brevity and pageviews
Ryan Thornburg
 
SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1
Dan D'Urso
 
Roma 2014
Roma 2014Roma 2014
Roma 2014
JAVIER ALSINA GONZALEZ
 
Thom Point of View on Segmentation
Thom Point of View on SegmentationThom Point of View on Segmentation
Thom Point of View on Segmentation
PieterDuron
 
鑄造產業轉型升級與發展-創業懶人包-青年創業及圓夢網
鑄造產業轉型升級與發展-創業懶人包-青年創業及圓夢網鑄造產業轉型升級與發展-創業懶人包-青年創業及圓夢網
鑄造產業轉型升級與發展-創業懶人包-青年創業及圓夢網
RICK Lin
 
My Web Portfolio
My Web PortfolioMy Web Portfolio
My Web Portfolio
beth7865
 
SQL212 Oracle SQL Manual
SQL212 Oracle SQL ManualSQL212 Oracle SQL Manual
SQL212 Oracle SQL Manual
Dan D'Urso
 
Get database properties using power shell in sql server 2008 techrepublic
Get database properties using power shell in sql server 2008   techrepublicGet database properties using power shell in sql server 2008   techrepublic
Get database properties using power shell in sql server 2008 techrepublic
Kaing Menglieng
 
ITT PROJECT ON CREATE QUERY(QUERY-SELECT WITH CONDITION, MAKE A TABLE,APPEND,...
ITT PROJECT ON CREATE QUERY(QUERY-SELECT WITH CONDITION, MAKE A TABLE,APPEND,...ITT PROJECT ON CREATE QUERY(QUERY-SELECT WITH CONDITION, MAKE A TABLE,APPEND,...
ITT PROJECT ON CREATE QUERY(QUERY-SELECT WITH CONDITION, MAKE A TABLE,APPEND,...
Alok Mishra
 
MS-ACCESS:CREATE TAB(QUERY-SELECT WITH CONDITIONS, MAKE A TABLE,DELETE,APPNED...
MS-ACCESS:CREATE TAB(QUERY-SELECT WITH CONDITIONS, MAKE A TABLE,DELETE,APPNED...MS-ACCESS:CREATE TAB(QUERY-SELECT WITH CONDITIONS, MAKE A TABLE,DELETE,APPNED...
MS-ACCESS:CREATE TAB(QUERY-SELECT WITH CONDITIONS, MAKE A TABLE,DELETE,APPNED...
Ashish Saxena
 
How to Create A Microsoft Access 2007 Database
How to Create A Microsoft Access 2007 DatabaseHow to Create A Microsoft Access 2007 Database
How to Create A Microsoft Access 2007 Database
Rebecca Wright-Washington
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms access
jigeno
 
Teknologi dalam pendidikan
Teknologi dalam pendidikanTeknologi dalam pendidikan
Teknologi dalam pendidikan
Rudy Jemain Rj
 
AIA101.1.MS Access Tables & Data
AIA101.1.MS Access Tables & DataAIA101.1.MS Access Tables & Data
AIA101.1.MS Access Tables & Data
Dan D'Urso
 
AVB202 Intermediate Microsoft Access VBA
AVB202 Intermediate Microsoft Access VBAAVB202 Intermediate Microsoft Access VBA
AVB202 Intermediate Microsoft Access VBA
Dan D'Urso
 
Terranova Brochure
Terranova BrochureTerranova Brochure
Terranova Brochure
elsearles
 
Link Journalism: Curation to increase trust, relevance, brevity and pageviews
Link Journalism: Curation to increase trust, relevance, brevity and pageviewsLink Journalism: Curation to increase trust, relevance, brevity and pageviews
Link Journalism: Curation to increase trust, relevance, brevity and pageviews
Ryan Thornburg
 
SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1
Dan D'Urso
 
Thom Point of View on Segmentation
Thom Point of View on SegmentationThom Point of View on Segmentation
Thom Point of View on Segmentation
PieterDuron
 
鑄造產業轉型升級與發展-創業懶人包-青年創業及圓夢網
鑄造產業轉型升級與發展-創業懶人包-青年創業及圓夢網鑄造產業轉型升級與發展-創業懶人包-青年創業及圓夢網
鑄造產業轉型升級與發展-創業懶人包-青年創業及圓夢網
RICK Lin
 
My Web Portfolio
My Web PortfolioMy Web Portfolio
My Web Portfolio
beth7865
 
SQL212 Oracle SQL Manual
SQL212 Oracle SQL ManualSQL212 Oracle SQL Manual
SQL212 Oracle SQL Manual
Dan D'Urso
 

Similar to AIN102.1 Microsoft Access Queries Module 1 (20)

AIN102 Microsoft Access Queries
AIN102 Microsoft Access QueriesAIN102 Microsoft Access Queries
AIN102 Microsoft Access Queries
Dan D'Urso
 
SQL212.1 Introduction to SQL using Oracle Module 1
SQL212.1 Introduction to SQL using Oracle Module 1SQL212.1 Introduction to SQL using Oracle Module 1
SQL212.1 Introduction to SQL using Oracle Module 1
Dan D'Urso
 
AIN102D Access date functions sample queries
AIN102D Access date functions sample queriesAIN102D Access date functions sample queries
AIN102D Access date functions sample queries
Dan D'Urso
 
IBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql FeaturesIBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql Features
Keshav Murthy
 
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
Dan D'Urso
 
Java Database Connectivity (JDBC) with Spring Framework is a powerful combina...
Java Database Connectivity (JDBC) with Spring Framework is a powerful combina...Java Database Connectivity (JDBC) with Spring Framework is a powerful combina...
Java Database Connectivity (JDBC) with Spring Framework is a powerful combina...
demomki4
 
Multi-dimensional Clustering A nalysis
Multi-dimensional   Clustering A nalysisMulti-dimensional   Clustering A nalysis
Multi-dimensional Clustering A nalysis
MarcosUrdaneta7
 
AIN106 Access Reporting and Analysis
AIN106 Access Reporting and AnalysisAIN106 Access Reporting and Analysis
AIN106 Access Reporting and Analysis
Dan D'Urso
 
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
Database & Technology s.r.l.
 
08.abap dialog programming overview
08.abap dialog programming overview08.abap dialog programming overview
08.abap dialog programming overview
Raj Rajesh
 
Track 2 session 4 db2 for z os optimizer- what’s new in db2 11 and exploiti...
Track 2 session 4   db2 for z os optimizer- what’s new in db2 11 and exploiti...Track 2 session 4   db2 for z os optimizer- what’s new in db2 11 and exploiti...
Track 2 session 4 db2 for z os optimizer- what’s new in db2 11 and exploiti...
IBMSystemzEvents
 
ABAP Dialog Programming Overview.ppt
ABAP Dialog Programming Overview.pptABAP Dialog Programming Overview.ppt
ABAP Dialog Programming Overview.ppt
GaneshP820675
 
SQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL QueriesSQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL Queries
Dan D'Urso
 
AIN102S Access string function sample queries
AIN102S Access string function sample queriesAIN102S Access string function sample queries
AIN102S Access string function sample queries
Dan D'Urso
 
SQL212.2 Introduction to SQL using Oracle Module 2
SQL212.2 Introduction to SQL using Oracle Module 2SQL212.2 Introduction to SQL using Oracle Module 2
SQL212.2 Introduction to SQL using Oracle Module 2
Dan D'Urso
 
Database Management System - SQL beginner Training
Database Management System - SQL beginner Training Database Management System - SQL beginner Training
Database Management System - SQL beginner Training
Moutasm Tamimi
 
Essentials of Database Management 1st Edition Hoffer Test Bank
Essentials of Database Management 1st Edition Hoffer Test BankEssentials of Database Management 1st Edition Hoffer Test Bank
Essentials of Database Management 1st Edition Hoffer Test Bank
kontzorrano4
 
SQL200.1 Module 1
SQL200.1 Module 1SQL200.1 Module 1
SQL200.1 Module 1
Dan D'Urso
 
Module-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdfModule-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdf
Suman817957
 
Essentials of Database Management 1st Edition Hoffer Test Bank
Essentials of Database Management 1st Edition Hoffer Test BankEssentials of Database Management 1st Edition Hoffer Test Bank
Essentials of Database Management 1st Edition Hoffer Test Bank
saxlinsitou55
 
AIN102 Microsoft Access Queries
AIN102 Microsoft Access QueriesAIN102 Microsoft Access Queries
AIN102 Microsoft Access Queries
Dan D'Urso
 
SQL212.1 Introduction to SQL using Oracle Module 1
SQL212.1 Introduction to SQL using Oracle Module 1SQL212.1 Introduction to SQL using Oracle Module 1
SQL212.1 Introduction to SQL using Oracle Module 1
Dan D'Urso
 
AIN102D Access date functions sample queries
AIN102D Access date functions sample queriesAIN102D Access date functions sample queries
AIN102D Access date functions sample queries
Dan D'Urso
 
IBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql FeaturesIBM Informix dynamic server 11 10 Cheetah Sql Features
IBM Informix dynamic server 11 10 Cheetah Sql Features
Keshav Murthy
 
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
Dan D'Urso
 
Java Database Connectivity (JDBC) with Spring Framework is a powerful combina...
Java Database Connectivity (JDBC) with Spring Framework is a powerful combina...Java Database Connectivity (JDBC) with Spring Framework is a powerful combina...
Java Database Connectivity (JDBC) with Spring Framework is a powerful combina...
demomki4
 
Multi-dimensional Clustering A nalysis
Multi-dimensional   Clustering A nalysisMulti-dimensional   Clustering A nalysis
Multi-dimensional Clustering A nalysis
MarcosUrdaneta7
 
AIN106 Access Reporting and Analysis
AIN106 Access Reporting and AnalysisAIN106 Access Reporting and Analysis
AIN106 Access Reporting and Analysis
Dan D'Urso
 
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
2015 owb2 odi converter - white paper_owb_to_odi_migration_service_d&t
Database & Technology s.r.l.
 
08.abap dialog programming overview
08.abap dialog programming overview08.abap dialog programming overview
08.abap dialog programming overview
Raj Rajesh
 
Track 2 session 4 db2 for z os optimizer- what’s new in db2 11 and exploiti...
Track 2 session 4   db2 for z os optimizer- what’s new in db2 11 and exploiti...Track 2 session 4   db2 for z os optimizer- what’s new in db2 11 and exploiti...
Track 2 session 4 db2 for z os optimizer- what’s new in db2 11 and exploiti...
IBMSystemzEvents
 
ABAP Dialog Programming Overview.ppt
ABAP Dialog Programming Overview.pptABAP Dialog Programming Overview.ppt
ABAP Dialog Programming Overview.ppt
GaneshP820675
 
SQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL QueriesSQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL Queries
Dan D'Urso
 
AIN102S Access string function sample queries
AIN102S Access string function sample queriesAIN102S Access string function sample queries
AIN102S Access string function sample queries
Dan D'Urso
 
SQL212.2 Introduction to SQL using Oracle Module 2
SQL212.2 Introduction to SQL using Oracle Module 2SQL212.2 Introduction to SQL using Oracle Module 2
SQL212.2 Introduction to SQL using Oracle Module 2
Dan D'Urso
 
Database Management System - SQL beginner Training
Database Management System - SQL beginner Training Database Management System - SQL beginner Training
Database Management System - SQL beginner Training
Moutasm Tamimi
 
Essentials of Database Management 1st Edition Hoffer Test Bank
Essentials of Database Management 1st Edition Hoffer Test BankEssentials of Database Management 1st Edition Hoffer Test Bank
Essentials of Database Management 1st Edition Hoffer Test Bank
kontzorrano4
 
SQL200.1 Module 1
SQL200.1 Module 1SQL200.1 Module 1
SQL200.1 Module 1
Dan D'Urso
 
Module-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdfModule-Pool-Tutorial.pdf
Module-Pool-Tutorial.pdf
Suman817957
 
Essentials of Database Management 1st Edition Hoffer Test Bank
Essentials of Database Management 1st Edition Hoffer Test BankEssentials of Database Management 1st Edition Hoffer Test Bank
Essentials of Database Management 1st Edition Hoffer Test Bank
saxlinsitou55
 
Ad

More from Dan D'Urso (20)

LCD201d Database Diagramming with Lucidchart
LCD201d Database Diagramming with LucidchartLCD201d Database Diagramming with Lucidchart
LCD201d Database Diagramming with Lucidchart
Dan D'Urso
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Dan D'Urso
 
VIS201d Visio Database Diagramming
VIS201d Visio Database DiagrammingVIS201d Visio Database Diagramming
VIS201d Visio Database Diagramming
Dan D'Urso
 
PRJ101a Project 2013 Accelerated
PRJ101a Project 2013 AcceleratedPRJ101a Project 2013 Accelerated
PRJ101a Project 2013 Accelerated
Dan D'Urso
 
PRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic TrainingPRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic Training
Dan D'Urso
 
Introduction to coding using Python
Introduction to coding using PythonIntroduction to coding using Python
Introduction to coding using Python
Dan D'Urso
 
Stem conference
Stem conferenceStem conference
Stem conference
Dan D'Urso
 
Microsoft access self joins
Microsoft access self joinsMicrosoft access self joins
Microsoft access self joins
Dan D'Urso
 
SQL302 Intermediate SQL
SQL302 Intermediate SQLSQL302 Intermediate SQL
SQL302 Intermediate SQL
Dan D'Urso
 
SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3
Dan D'Urso
 
SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2
Dan D'Urso
 
Course Catalog
Course CatalogCourse Catalog
Course Catalog
Dan D'Urso
 
SQL201W MySQL SQL Manual
SQL201W MySQL SQL ManualSQL201W MySQL SQL Manual
SQL201W MySQL SQL Manual
Dan D'Urso
 
AIN100
AIN100AIN100
AIN100
Dan D'Urso
 
SQL206 SQL Median
SQL206 SQL MedianSQL206 SQL Median
SQL206 SQL Median
Dan D'Urso
 
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
Dan D'Urso
 
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
Dan D'Urso
 
SQL202 SQL Server SQL Manual
SQL202 SQL Server SQL ManualSQL202 SQL Server SQL Manual
SQL202 SQL Server SQL Manual
Dan D'Urso
 
AIN100B Microsoft Access Level 2
AIN100B Microsoft Access Level 2AIN100B Microsoft Access Level 2
AIN100B Microsoft Access Level 2
Dan D'Urso
 
AMP110 Microsoft Access Macros
AMP110 Microsoft Access MacrosAMP110 Microsoft Access Macros
AMP110 Microsoft Access Macros
Dan D'Urso
 
LCD201d Database Diagramming with Lucidchart
LCD201d Database Diagramming with LucidchartLCD201d Database Diagramming with Lucidchart
LCD201d Database Diagramming with Lucidchart
Dan D'Urso
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Dan D'Urso
 
VIS201d Visio Database Diagramming
VIS201d Visio Database DiagrammingVIS201d Visio Database Diagramming
VIS201d Visio Database Diagramming
Dan D'Urso
 
PRJ101a Project 2013 Accelerated
PRJ101a Project 2013 AcceleratedPRJ101a Project 2013 Accelerated
PRJ101a Project 2013 Accelerated
Dan D'Urso
 
PRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic TrainingPRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic Training
Dan D'Urso
 
Introduction to coding using Python
Introduction to coding using PythonIntroduction to coding using Python
Introduction to coding using Python
Dan D'Urso
 
Stem conference
Stem conferenceStem conference
Stem conference
Dan D'Urso
 
Microsoft access self joins
Microsoft access self joinsMicrosoft access self joins
Microsoft access self joins
Dan D'Urso
 
SQL302 Intermediate SQL
SQL302 Intermediate SQLSQL302 Intermediate SQL
SQL302 Intermediate SQL
Dan D'Urso
 
SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3
Dan D'Urso
 
SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2
Dan D'Urso
 
Course Catalog
Course CatalogCourse Catalog
Course Catalog
Dan D'Urso
 
SQL201W MySQL SQL Manual
SQL201W MySQL SQL ManualSQL201W MySQL SQL Manual
SQL201W MySQL SQL Manual
Dan D'Urso
 
SQL206 SQL Median
SQL206 SQL MedianSQL206 SQL Median
SQL206 SQL Median
Dan D'Urso
 
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
Dan D'Urso
 
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
Dan D'Urso
 
SQL202 SQL Server SQL Manual
SQL202 SQL Server SQL ManualSQL202 SQL Server SQL Manual
SQL202 SQL Server SQL Manual
Dan D'Urso
 
AIN100B Microsoft Access Level 2
AIN100B Microsoft Access Level 2AIN100B Microsoft Access Level 2
AIN100B Microsoft Access Level 2
Dan D'Urso
 
AMP110 Microsoft Access Macros
AMP110 Microsoft Access MacrosAMP110 Microsoft Access Macros
AMP110 Microsoft Access Macros
Dan D'Urso
 
Ad

Recently uploaded (20)

Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Vaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without HallucinationsVaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without Hallucinations
john409870
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Top 10 IT Help Desk Outsourcing Services
Top 10 IT Help Desk Outsourcing ServicesTop 10 IT Help Desk Outsourcing Services
Top 10 IT Help Desk Outsourcing Services
Infrassist Technologies Pvt. Ltd.
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Vaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without HallucinationsVaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without Hallucinations
john409870
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdfAre Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Are Cloud PBX Providers in India Reliable for Small Businesses (1).pdf
Telecoms Supermarket
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 

AIN102.1 Microsoft Access Queries Module 1

  • 1. AIN102 Access Query Design P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com
  • 2. AIN102 Contact Information Admissions AIN102 Module 1 P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com [email_address] Copyright 2001-20011 All rights reserved.
  • 3. AIN102 Notes This course is based on an earlier course, SQL200A, which was focused on using SQL in the Access environment. As such the screenshots still reflect SQL view as well the Query Designer view. This is actually a plus. Admissions AIN102 Module 1
  • 4. AIN102 Resources Manuals can be downloaded from SlideShare. Slides can be viewed on SlideShare… http://www.slideshare.net/OCDatabases Admissions AIN102 Module 1
  • 5. AIN102 Access Query Design Module 1 – Relational Database Background, Basic Single Table Retrieval Operations
  • 6. AIN102 Session 1 – Review of Relational Databases and Single Table Retrieval, Functions and Operators Session 2 – Multi-table retrieval, Subqueries, Unions, Action Queries, Indexes AIN102 Module 1 Admissions AIN102 Module 1
  • 7. AIN102 Lecture/discussion with demonstrations Mostly practical, but a dose of “theory” Assumes some familiarity with MS Access Hands-on Exercises (Mostly cumulative) About 3 hours per module AIN102 Module 1 Admissions AIN102 Module 1
  • 8. Module 1 Concepts Relational databases SQL Access Query Designer SELECT Query Basic Filter criteria Complex criteria AIN102 Module 1 Admissions AIN102 Module 1 Field Operations Functions Operators Calculated fields Concatenation
  • 9. Microsoft Access Query Design Course focus is Microsoft Access Query Design Queries are widely used for: Database administration Enterprise application development Data driven web sites Retrieving and modifying data in MS Access databases A foundation skill for eBusiness and almost all major business applications that use relational databases AIN102 Module 1 Admissions AIN102 Module 1
  • 10. Access Query Design and SQL Class database will be MS Access – the SQL engine Access uses is called JET A basic knowledge of Access is assumed Focus of this class will be on the query designer, with SQL used from time-to-time to explain concepts AIN102 Module 1 Admissions AIN102 Module 1
  • 11. Relational Database Basics Storage Databases Tables Rows Columns Indexes Views SQL interface AIN102 Module 1 Admissions AIN102 Module 1
  • 12. Storage In Access one file with extension mdb or accdb. I.e mydatabase.accdb . Database splitter can be used to split it into two parts – a front end and a back end. Interface to physical storage via the “JET” database engine. This is the behind-the scenes-workhorse. AIN102 Module 1 Admissions AIN102 Module 1
  • 13. Databases In the Access world refers to all objects stored in the mdb. Tables Queries From Reports Macros Code modules AIN102 Module 1 Admissions AIN102 Module 1
  • 14. AIN102 Module 1 Admissions AIN102 Module 1 Relational Database Table
  • 15. AIN102 Module 1 Admissions AIN102 Module 1 Sample Access Database
  • 16. AIN102 Module 1 Admissions AIN102 Module 1 Database Relationships
  • 17. Approaching Query Design Try to build queries a step at a time Save existing queries that are working as you like; modify them with a new name when building a modified query Try looking at the generated SQL code from time-to-time AIN102 Module 1 Admissions AIN102 Module 1
  • 18. Query Types Select Action Update Delete Insert Maketable Special use queries Crosstab Data Definition Language (DDL) Union SQL pass-through AIN102 Module 1 Admissions AIN102 Module 1
  • 19. DDL Data definition language (DDL) to create and modify tables, etc. Create, alter, drop, etc. Must be “hand-coded” in Access But can be useful for database administration Done in MS Access via SQL Specific Queries – Will not be covered in the course AIN102 Module 1 Admissions AIN102 Module 1
  • 20. MS Access DDL Queries AIN102 Module 1 Admissions AIN102 Module 1
  • 21. DCL Data Control Language (DCL) to control user rights, etc. Grant Revoke Constraints Used primarily in enterprise databases Can be done in Access but not covered in this course AIN102 Module 1 Admissions AIN102 Module 1
  • 22. DML Data Manipulation Language (DML) Select Query Append Query Update Query Delete Query Maketable Query (a special type of Select) Union Query (really combined Selects) MS Access Query Designer will create these statements “behind the scenes” AIN102 Module 1 Admissions AIN102 Module 1
  • 23. MS Access Action Queries AIN102 Module 1 Admissions AIN102 Module 1
  • 24. Other Access Queries Crosstab Pass Through – used to pass an SQL statement directly to a back end database w/out processing by Access AIN102 Module 1 Admissions AIN102 Module 1
  • 25. Sample Database Before we continue… Load the sample database if you haven’t already AIN102 Module 1 Admissions AIN102 Module 1
  • 26. Query Designer AIN102 Module 1 Admissions AIN102 Module 1 Right click anywhere for SQL View Double click or drag to add a field Double click to add a table
  • 27. SELECT Queries AIN102 Module 1 Admissions AIN102 Module 1 Basic Syntax: Select column-list or * From table-list * Means all columns
  • 28. MS Access SELECT Query AIN102 Module 1 Admissions AIN102 Module 1 Drag and Drop or double click
  • 29. MS Access SELECT SQL AIN102 Module 1 Admissions AIN102 Module 1
  • 30. AIN102 Module 1 Admissions AIN102 Module 1 Simple Select Query Results
  • 31. SELECT w/ Where AIN102 Module 1 Admissions AIN102 Module 1 Filters retrieved rows Syntax: SELECT column-list FROM table-list WHERE selection-criteria
  • 32. Comparison Operators < less than > greater than <= less than or equal >= greater than or equal = equal <> not equal Admissions AIN102 Module 1
  • 33. SELECT w/ WHERE AIN102 Module 1 Admissions AIN102 Module 1
  • 34. SELECT w/ WHERE AIN102 Module 1 Admissions AIN102 Module 1
  • 35. SELECT w/ WHERE Results AIN102 Module 1 Admissions AIN102 Module 1
  • 36. Complex Filters AIN102 Module 1 Admissions AIN102 Module 1 Follows normal boolean logic Select PatID, LastName, etc… From patients Where (LastName = “Thomas” or birthdate < #1/1/95#) and city = “Corona”)
  • 37. Complex Filter AIN102 Module 1 Admissions AIN102 Module 1 AND
  • 38. Select w/ Complex Where AIN102 Module 1 Admissions AIN102 Module 1
  • 39. Complex Filter Results AIN102 Module 1 Admissions AIN102 Module 1
  • 40. Special Operators LIKE IN BETWEEN IS NULL AIN102 Module 1 Admissions AIN102 Module 1
  • 41. Like (“Wild Card Matches”) Where customer_last_name like “Jo*” *= string of characters Where customer_last_name like “Jo?” ? = exactly one character AIN102 Module 1 Admissions AIN102 Module 1 Access actually allows more sophisticated Unix style search patterns as well – see help.
  • 42. LIKE AIN102 Module 1 Admissions AIN102 Module 1 Names ending in “S”
  • 43. LIKE AIN102 Module 1 Admissions AIN102 Module 1 Names ending in “S”
  • 44. LIKE Results AIN102 Module 1 Admissions AIN102 Module 1
  • 45. IS NULL AIN102 Module 1 Admissions AIN102 Module 1 Select columnns From clients Where zip IS NULL SQL (including JET) uses three valued logic. Must use IS NULL to test for unknowns. A null is NOT the same as blank or empty.
  • 46. IS NULL AIN102 Module 1 Admissions AIN102 Module 1
  • 47. IS NULL AIN102 Module 1 Admissions AIN102 Module 1
  • 48. IS NULL Results AIN102 Module 1 Admissions AIN102 Module 1 OK. Now try finding all patients with a blank address. Was the above row retrieved? Why or why not?
  • 49. IN AIN102 Module 1 Admissions AIN102 Module 1 Select * From patients Where lastname IN (“Smith”, “Thomas”, “Juarez”) Note: what is inside parentheses is a list. Later we will replace the list with a subquery which generates the list items.
  • 50. IN AIN102 Module 1 Admissions AIN102 Module 1
  • 51. IN AIN102 Module 1 Admissions AIN102 Module 1 List of values
  • 52. SELECT w/in IN Results AIN102 Module 1 Admissions AIN102 Module 1
  • 53. BETWEEN AIN102 Module 1 Admissions AIN102 Module 1 SELECT * FROM admissions WHERE admit_date BETWEEN #10/1/2001# and #12/31/2001# Note: between is inclusive
  • 54. BETWEEN AIN102 Module 1 Admissions AIN102 Module 1
  • 55. BETWEEN Results AIN102 Module 1 Admissions AIN102 Module 1
  • 56. Removing Duplicates AIN102 Module 1 Admissions AIN102 Module 1 SELECT DISTINCT PatNo FROM admissions List once each employee who has a labor ticket Removes duplicate rows from result set
  • 57. DISTINCT AIN102 Module 1 Admissions AIN102 Module 1
  • 58. Distinct Results AIN102 Module 1 Admissions AIN102 Module 1 W/out Distinct With Distinct
  • 59. Sorting – ORDER BY AIN102 Module 1 Admissions AIN102 Module 1 DESC will sort in descending order Basic syntax : SELECT column list FROM table list WHERE selection criteria ORDER BY column list [DESC]
  • 60. Sorting – ORDER BY AIN102 Module 1 Admissions AIN102 Module 1 Select * From patients Where state in(“CA”, “OR”, “WA”) Order by birthdate desc Example: List patients in Pacific Coast sorted by youngest to oldest
  • 61. Sorting – ORDER BY AIN102 Module 1 Admissions AIN102 Module 1 Note: modify the “select_in” query
  • 62. Sorting – ORDER BY AIN102 Module 1 Admissions AIN102 Module 1
  • 63. Sorting – Results AIN102 Module 1 Admissions AIN102 Module 1
  • 64. Query/SQL Exercises List all patient numbers, etc. for patients who co-paid more than $20; sort by co-pay amount, largest first List diagnostics that contain b, d, or q in the diagnostic code List the patient id’s for admissions in the fall (Sep, Oct, Nov) of 2001 and 2002 AIN102 Module 1 Admissions AIN102 Module 1
  • 65. Calculated Fields AIN102 Module 1 Admissions AIN102 Module 1 Example: Select a + b as result Syntax: SELECT expression AS new column name Result is a “column alias”
  • 66. Calculated Fields AIN102 Module 1 Admissions AIN102 Module 1 New column name Follow name with “:”
  • 67. Calculated Fields AIN102 Module 1 Admissions AIN102 Module 1
  • 68. Calculated Fields - Results AIN102 Module 1 Admissions AIN102 Module 1
  • 69. Concatenation “ Adds” two character fields using “&” symbol Useful for formatting names, addresses, etc. Example: Select firstname & “ “ & lastname as fullname AIN102 Module 1 Admissions AIN102 Module 1
  • 70. Concatenation AIN102 Module 1 Admissions AIN102 Module 1 Sort, but don’t show
  • 71. Concatenation AIN102 Module 1 Admissions AIN102 Module 1
  • 72. Concatenation AIN102 Module 1 Admissions AIN102 Module 1 Single column with full name, sorted by last name Tip: handy for reports
  • 73. SQL Exercises List all the patients with a “fullname” field; sorted by last name. Add a calculated field which shows their loaded copay (copay *1.5). Show the fullname, but not the individual names. AIN102 Module 1 Admissions AIN102 Module 1
  • 74. End Session 1 AIN102 Module 1 Admissions AIN102 Module 1 Next session : multi-table operations, subqueries, unions, action queries, indexes