SlideShare uma empresa Scribd logo
1 de 29
Access Lesson 3
Creating Queries

Microsoft Office 2010
Introductory

1

Pasewark & Pasewark
Objectives


Access Lesson 3



Create a query using a Wizard.
Sort and filter data in a datasheet.
Create a query in Design view.
Create relationships in a database.
Create a query based on more than one table.
Use operators in a condition in a query.
Calculate data using a query.



2

Pasewark & Pasewark






Microsoft Office 2010 Introductory
Vocabulary


Access Lesson 3



And operator
AutoFilter
calculated field
common field
condition
expression
filter



3

Pasewark & Pasewark














Filter By Form
Filter By Selection
foreign key
multitable query
one-to-many
relationship
Or operator

Microsoft Office 2010 Introductory
Vocabulary (continued)


Access Lesson 3



query
referential integrity
relationship
Simple Query Wizard
sort
subdatasheet
Total row



4

Pasewark & Pasewark






Microsoft Office 2010 Introductory
Creating a Query with the Simple
Query Wizard

Access Lesson 3





A query is a database object that lets you
ask the database about the data it contains.
The result of a query is a datasheet that
includes the records you asked to see.
Specifications in a query are called
conditions.
–
–

5

A condition is also called a criterion.
When the condition has two or more parts to it,
the two conditions are called criteria.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating a Query with the Simple
Query Wizard (continued)
A query is based on a table or another query
(or multiple tables/queries)
When you open a query object, you run the
query. Running a query displays a datasheet
with only the records and fields that you
asked to see.
The Simple Query Wizard is an easy way to
create a query.

Access Lesson 3




6

Pasewark & Pasewark



Microsoft Office 2010 Introductory
Creating a Query with the Simple
Query Wizard (continued)
First Simple Query Wizard dialog box

Access Lesson 3



7

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating a Query with the Simple
Query Wizard (continued)
A detail query shows every field in each
record.
A summary query lets you summarize
relevant data, such as adding the field values
in a column that stores price data.

Access Lesson 3




8

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Sorting Data
When you view field values in ascending or
descending order from A to Z or from
smallest to largest, you apply a sort to the
field.
Sorting a field in ascending order arranges
records from A to Z, or from smallest to
largest. Sorting a field in descending order
arranges records from Z to A, or from largest
to smallest.

Access Lesson 3





9

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Filtering Data

Access Lesson 3



10



A filter temporarily displays records in a
datasheet based on the condition that you
specify.
You can use different types of filters to
display the data you need. When you use
Filter By Selection, you select a field value,
and then click the Selection button in the Sort
& Filter group on the Home tab.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Filtering Data (continued)

Access Lesson 3



11



You can use Filter By Form to display
records that contain one or more values
based on the values stored in one or more
fields. Click the Advanced button in the Sort
& Filter group on the Home tab.
Click the Toggle Filter button in the Sort &
Filter group on the Home tab to display only
records in the datasheet that match the filter.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Filtering Data (continued)

Access Lesson 3



12



An easy way to sort and filter data is to use
an AutoFilter.
An AutoFilter is a menu that opens when you
click the arrow on the right side of a field
selector, and contains options for:
–
–

Sorting data and clearing filters.
Using Filter By Selection and Filter By Form.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Filtering Data (continued)
AutoFilter for the Product Name field (a Text field)

Access Lesson 3



13

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating a Query in Design View

Access Lesson 3



14



For a query datasheet, you have more
sorting and filtering options when you create
or modify a query in Design view.
In the Query Design window, you build and
change the query using the design grid.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating a Query in Design View
(continued)

Access Lesson 3



15

The Query window in Design view is divided
into two parts.
–
–



The top shows the field list for the table you
included in the query design.
The bottom contains a design grid that allows you
to specify fields, conditions, and sort orders.

A query can contain one, some, or all of the
fields in the table. You can add the fields in
any order to the design grid.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating a Query in Design View
(continued)

Access Lesson 3



16





You can set a sort order for a field using the
field's Sort box in the design grid.
You can run a query by clicking the Run
button in the Results group on the Query
Tools Design tab. When you run a query, the
results appear in a query datasheet.
To add a condition to a field, click in the
field's Criteria box, and then type the
condition.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating Table Relationships

Access Lesson 3






17

The feature that lets you connect the data in
the tables is a relationship.
To create a relationship between two tables,
you must design the tables so they contain a
common field. A common field is a field that
appears in both tables, has the same data
type, and contains the same values.
A common field is also called a matching
field.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating Table Relationships
(continued)

Access Lesson 3



18

The most common relationship is a one-tomany relationship.
–



One record in the first table can match many
records in the second table.

The common field in the related table is
called a foreign key when it is used in a
relationship.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating Table Relationships
(continued)

Access Lesson 3



19



When you relate tables, Access uses a set of
rules to ensure that there are matching
values in the common field used to form the
relationship. This set of rules is called
referential integrity.
Referential integrity protects the data in the
tables to make sure that data is not
accidentally deleted or changed, resulting in
inconsistent data.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating Table Relationships
(continued)
Relationships window after creating a one-to-many relationship

Access Lesson 3



20

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Creating a Multitable Query

Access Lesson 3



21



Queries based on more than one table are
sometimes called multitable queries.
After you add two related tables to the query
design, a join line shows the relationship.
–
–

The join line connects the common field used to
relate the tables.
It defines the type of relationship by using the "1"
to represent the "one" and the infinity symbol to
represent the "many" side of the relationship.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Using Operators in a Condition

Access Lesson 3



22





In an exact match condition the records
must contain the specified value.
In a range-of-values condition the record
must match a range of values.
The And operator selects records that match
all of two or more conditions in a query.
The Or operator selects records that match at
least one of two or more conditions in a query.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Using Operators in a Condition
(continued)
Relational operators

Access Lesson 3



23

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Calculating Data

Access Lesson 3



24

Access provides two ways to calculate data
using a query:
–

–

Total Row: Use the Total row to count the
number of values in a column. The Total row
includes additional functions for values.
Calculated Field: A field with a value calculated
using other fields is called a calculated field. The
calculation is called an expression.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Access Lesson 3

Summary

25

In this lesson, you learned:
 A query is a database object that lets you ask the
database a question about the data it contains. You
can create a query quickly and easily using the
Simple Query Wizard, which asks you about the data
you want to see and lets you select options in dialog
boxes.
 You can change the way data is sorted in a datasheet
by applying an ascending or a descending sort order
to one of the fields.
Pasewark & Pasewark

Microsoft Office 2010 Introductory
Summary (continued)

Access Lesson 3



26

You can use a filter in a datasheet to temporarily display
records in a datasheet based on a condition that you
specify. Filter By Selection lets you select a field value or
part of a field value in a datasheet and then filter out all
records that do not match the filter. Filter By Form lets
you display records that match a value you select in a
field. An AutoFilter opens when you click the arrow on a
field selector. You can use an AutoFilter to sort and filter
data. You can also move and sort fields in Design view.
To run a query, click the Run button in the Results group
on the Query Tools Design tab.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Summary (continued)

Access Lesson 3



27



When you need to create a query that uses conditions to
select records, create the query in Query Design view.
Use the Relationships window to create relationships
between tables in a database by joining tables with a field
that contains matching field values. A one-to-many
relationship exists when one record in the primary table
matches zero, one, or many records in the related table.
Referential integrity is the set of rules that Access uses to
protect data in the tables and to make sure that data is
not accidentally deleted or changed.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Summary (continued)

Access Lesson 3



28



A multitable query is a query that is based on more than one
table.
When you need to use a query to search for records that
match a range of values, use a relational operator in the
query design. When you need to select records that match
all of two or more conditions in a query, use the And
operator by placing the criteria in the same Criteria row in
the design grid. When you need to select records that match
at least one of two or more conditions in a query, use the Or
operator by placing the first condition in the Criteria row and
the second condition in the or row in the design grid.

Pasewark & Pasewark

Microsoft Office 2010 Introductory
Summary (continued)
In Access, you can perform calculations by using the
Total row in a datasheet, or by creating a calculated field
in the design grid in Query Design view.

Access Lesson 3



29

Pasewark & Pasewark

Microsoft Office 2010 Introductory

Mais conteúdo relacionado

Mais procurados

Presentation of ms word
Presentation of ms wordPresentation of ms word
Presentation of ms wordVaishnavi8950
 
Data Analytics Using MS Excel
Data Analytics Using MS ExcelData Analytics Using MS Excel
Data Analytics Using MS ExcelRajesh Math
 
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
 
Creating relationships with tables
Creating relationships with tablesCreating relationships with tables
Creating relationships with tablesJhen Articona
 
Formulas and functions - By Amresh Tiwari
Formulas and functions - By Amresh TiwariFormulas and functions - By Amresh Tiwari
Formulas and functions - By Amresh TiwariAmresh Tiwari
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel BasicsCompudon
 
Excel slide show
Excel slide showExcel slide show
Excel slide showRemon sai
 
Microsoft Office Excel 2003 Sorting And Filtering
Microsoft Office Excel 2003 Sorting And FilteringMicrosoft Office Excel 2003 Sorting And Filtering
Microsoft Office Excel 2003 Sorting And FilteringMarc Morgenstern
 
MS Access teaching powerpoint tasks
MS Access teaching powerpoint tasksMS Access teaching powerpoint tasks
MS Access teaching powerpoint tasksskomadina
 
Ms word Presentation
Ms word PresentationMs word Presentation
Ms word PresentationMadhab Behera
 

Mais procurados (20)

Presentation of ms word
Presentation of ms wordPresentation of ms word
Presentation of ms word
 
Ms excel
Ms excelMs excel
Ms excel
 
Data Analytics Using MS Excel
Data Analytics Using MS ExcelData Analytics Using MS Excel
Data Analytics Using MS Excel
 
Ms access 2010
Ms access 2010Ms access 2010
Ms access 2010
 
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...
 
Microsoft word
Microsoft wordMicrosoft word
Microsoft word
 
Ms access
Ms accessMs access
Ms access
 
Creating relationships with tables
Creating relationships with tablesCreating relationships with tables
Creating relationships with tables
 
Formulas and functions - By Amresh Tiwari
Formulas and functions - By Amresh TiwariFormulas and functions - By Amresh Tiwari
Formulas and functions - By Amresh Tiwari
 
Ms word
Ms wordMs word
Ms word
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel Basics
 
MS ACCESS PPT.pptx
MS ACCESS PPT.pptxMS ACCESS PPT.pptx
MS ACCESS PPT.pptx
 
Excel slide show
Excel slide showExcel slide show
Excel slide show
 
Microsoft Office Excel 2003 Sorting And Filtering
Microsoft Office Excel 2003 Sorting And FilteringMicrosoft Office Excel 2003 Sorting And Filtering
Microsoft Office Excel 2003 Sorting And Filtering
 
Ms excel
Ms excelMs excel
Ms excel
 
Ms access
Ms accessMs access
Ms access
 
Ms access
Ms accessMs access
Ms access
 
Msaccess
MsaccessMsaccess
Msaccess
 
MS Access teaching powerpoint tasks
MS Access teaching powerpoint tasksMS Access teaching powerpoint tasks
MS Access teaching powerpoint tasks
 
Ms word Presentation
Ms word PresentationMs word Presentation
Ms word Presentation
 

Destaque

Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAram SE
 
Access lesson05
Access lesson05Access lesson05
Access lesson05Aram SE
 
Ms Access ppt
Ms Access pptMs Access ppt
Ms Access pptanuj
 
Ch03 Access
Ch03 AccessCh03 Access
Ch03 AccessD
 
New Perspectives: Access.03
New Perspectives: Access.03New Perspectives: Access.03
New Perspectives: Access.03Anna Stirling
 
Basic Access Notes
Basic Access NotesBasic Access Notes
Basic Access NotesPyi Soe
 
MS Access Ch 2 PPT
MS Access Ch 2 PPTMS Access Ch 2 PPT
MS Access Ch 2 PPTprsmith72
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms accessjigeno
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAram SE
 
Lecture1
Lecture1Lecture1
Lecture1rjaeh
 
Database and Access Power Point
Database and Access Power PointDatabase and Access Power Point
Database and Access Power PointAyee_Its_Bailey
 
Communication skills in english
Communication skills in englishCommunication skills in english
Communication skills in englishAqib Memon
 
Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical MethodsChristian Robert
 
Access lesson 06 Integrating Access
Access lesson 06  Integrating AccessAccess lesson 06  Integrating Access
Access lesson 06 Integrating AccessAram SE
 
Monte Carlo G P U Jan2010
Monte  Carlo  G P U  Jan2010Monte  Carlo  G P U  Jan2010
Monte Carlo G P U Jan2010John Holden
 
OWASP Khartoum Cyber Security Session
OWASP Khartoum Cyber Security SessionOWASP Khartoum Cyber Security Session
OWASP Khartoum Cyber Security SessionOWASP Khartoum
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo SimulationAyman Hassan
 
01 computer%20 forensics%20in%20todays%20world
01 computer%20 forensics%20in%20todays%20world01 computer%20 forensics%20in%20todays%20world
01 computer%20 forensics%20in%20todays%20worldAqib Memon
 
Computer Forensics & Windows Registry
Computer Forensics & Windows RegistryComputer Forensics & Windows Registry
Computer Forensics & Windows Registryaradhanalaw
 

Destaque (20)

Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying Forms
 
Access lesson05
Access lesson05Access lesson05
Access lesson05
 
Ms Access ppt
Ms Access pptMs Access ppt
Ms Access ppt
 
Access lesson 2
Access lesson 2Access lesson 2
Access lesson 2
 
Ch03 Access
Ch03 AccessCh03 Access
Ch03 Access
 
New Perspectives: Access.03
New Perspectives: Access.03New Perspectives: Access.03
New Perspectives: Access.03
 
Basic Access Notes
Basic Access NotesBasic Access Notes
Basic Access Notes
 
MS Access Ch 2 PPT
MS Access Ch 2 PPTMS Access Ch 2 PPT
MS Access Ch 2 PPT
 
Basic introduction to ms access
Basic introduction to ms accessBasic introduction to ms access
Basic introduction to ms access
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a Database
 
Lecture1
Lecture1Lecture1
Lecture1
 
Database and Access Power Point
Database and Access Power PointDatabase and Access Power Point
Database and Access Power Point
 
Communication skills in english
Communication skills in englishCommunication skills in english
Communication skills in english
 
Monte Carlo Statistical Methods
Monte Carlo Statistical MethodsMonte Carlo Statistical Methods
Monte Carlo Statistical Methods
 
Access lesson 06 Integrating Access
Access lesson 06  Integrating AccessAccess lesson 06  Integrating Access
Access lesson 06 Integrating Access
 
Monte Carlo G P U Jan2010
Monte  Carlo  G P U  Jan2010Monte  Carlo  G P U  Jan2010
Monte Carlo G P U Jan2010
 
OWASP Khartoum Cyber Security Session
OWASP Khartoum Cyber Security SessionOWASP Khartoum Cyber Security Session
OWASP Khartoum Cyber Security Session
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo Simulation
 
01 computer%20 forensics%20in%20todays%20world
01 computer%20 forensics%20in%20todays%20world01 computer%20 forensics%20in%20todays%20world
01 computer%20 forensics%20in%20todays%20world
 
Computer Forensics & Windows Registry
Computer Forensics & Windows RegistryComputer Forensics & Windows Registry
Computer Forensics & Windows Registry
 

Semelhante a Access lesson 03 Creating Queries

Class viii ch-4 working with queries
Class  viii ch-4 working with queriesClass  viii ch-4 working with queries
Class viii ch-4 working with queriesjessandy
 
MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access TutorialvirtualMaryam
 
Chapter.10
Chapter.10Chapter.10
Chapter.10klivsie
 
1 Week 6 - What Well Be Working On This Week In th.docx
1 Week 6 - What Well Be Working On This Week  In th.docx1 Week 6 - What Well Be Working On This Week  In th.docx
1 Week 6 - What Well Be Working On This Week In th.docxdorishigh
 
HARJOT.ppt
HARJOT.pptHARJOT.ppt
HARJOT.pptsatgup78
 
Operate Spreadsheet applications ppt.pptx
Operate Spreadsheet applications ppt.pptxOperate Spreadsheet applications ppt.pptx
Operate Spreadsheet applications ppt.pptxEsubalew21
 
Module 08 Access & Use Database Application.pptx
Module 08 Access & Use Database Application.pptxModule 08 Access & Use Database Application.pptx
Module 08 Access & Use Database Application.pptxEsubalew21
 
Database as information system
Database as information systemDatabase as information system
Database as information systemKAZEMBETVOnline
 
Microsoft Access Notes 2007 Ecdl
Microsoft Access Notes 2007 EcdlMicrosoft Access Notes 2007 Ecdl
Microsoft Access Notes 2007 EcdlRichard Butler
 
Access lesson 01 Microsoft Access Basics
Access lesson 01 Microsoft Access BasicsAccess lesson 01 Microsoft Access Basics
Access lesson 01 Microsoft Access BasicsAram SE
 
Understand Charts in Excel - Chapter.03
Understand Charts in Excel - Chapter.03Understand Charts in Excel - Chapter.03
Understand Charts in Excel - Chapter.03chazaabdul
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAram SE
 
Chapter 4 microsoft access 2010
Chapter 4 microsoft access 2010Chapter 4 microsoft access 2010
Chapter 4 microsoft access 2010home
 
Lecture2 slides
Lecture2 slidesLecture2 slides
Lecture2 slidesCyri Jones
 

Semelhante a Access lesson 03 Creating Queries (20)

Class viii ch-4 working with queries
Class  viii ch-4 working with queriesClass  viii ch-4 working with queries
Class viii ch-4 working with queries
 
MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access Tutorial
 
Access.05
Access.05Access.05
Access.05
 
Chapter.10
Chapter.10Chapter.10
Chapter.10
 
Chapter.10
Chapter.10Chapter.10
Chapter.10
 
1 Week 6 - What Well Be Working On This Week In th.docx
1 Week 6 - What Well Be Working On This Week  In th.docx1 Week 6 - What Well Be Working On This Week  In th.docx
1 Week 6 - What Well Be Working On This Week In th.docx
 
HARJOT.ppt
HARJOT.pptHARJOT.ppt
HARJOT.ppt
 
Operate Spreadsheet applications ppt.pptx
Operate Spreadsheet applications ppt.pptxOperate Spreadsheet applications ppt.pptx
Operate Spreadsheet applications ppt.pptx
 
Module 08 Access & Use Database Application.pptx
Module 08 Access & Use Database Application.pptxModule 08 Access & Use Database Application.pptx
Module 08 Access & Use Database Application.pptx
 
Database as information system
Database as information systemDatabase as information system
Database as information system
 
nithin raj ppt.ppt
nithin raj ppt.pptnithin raj ppt.ppt
nithin raj ppt.ppt
 
nnr.ppt
nnr.pptnnr.ppt
nnr.ppt
 
Microsoft Access Notes 2007 Ecdl
Microsoft Access Notes 2007 EcdlMicrosoft Access Notes 2007 Ecdl
Microsoft Access Notes 2007 Ecdl
 
Access lesson 01 Microsoft Access Basics
Access lesson 01 Microsoft Access BasicsAccess lesson 01 Microsoft Access Basics
Access lesson 01 Microsoft Access Basics
 
Understand Charts in Excel - Chapter.03
Understand Charts in Excel - Chapter.03Understand Charts in Excel - Chapter.03
Understand Charts in Excel - Chapter.03
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a Database
 
Chapter 4 microsoft access 2010
Chapter 4 microsoft access 2010Chapter 4 microsoft access 2010
Chapter 4 microsoft access 2010
 
Lecture2 slides
Lecture2 slidesLecture2 slides
Lecture2 slides
 
Database Project
Database ProjectDatabase Project
Database Project
 
MS ACCESS PPT.pptx
MS ACCESS PPT.pptxMS ACCESS PPT.pptx
MS ACCESS PPT.pptx
 

Último

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Access lesson 03 Creating Queries

  • 1. Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory 1 Pasewark & Pasewark
  • 2. Objectives  Access Lesson 3  Create a query using a Wizard. Sort and filter data in a datasheet. Create a query in Design view. Create relationships in a database. Create a query based on more than one table. Use operators in a condition in a query. Calculate data using a query.  2 Pasewark & Pasewark     Microsoft Office 2010 Introductory
  • 3. Vocabulary  Access Lesson 3  And operator AutoFilter calculated field common field condition expression filter  3 Pasewark & Pasewark           Filter By Form Filter By Selection foreign key multitable query one-to-many relationship Or operator Microsoft Office 2010 Introductory
  • 4. Vocabulary (continued)  Access Lesson 3  query referential integrity relationship Simple Query Wizard sort subdatasheet Total row  4 Pasewark & Pasewark     Microsoft Office 2010 Introductory
  • 5. Creating a Query with the Simple Query Wizard Access Lesson 3   A query is a database object that lets you ask the database about the data it contains. The result of a query is a datasheet that includes the records you asked to see. Specifications in a query are called conditions. – – 5 A condition is also called a criterion. When the condition has two or more parts to it, the two conditions are called criteria. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 6. Creating a Query with the Simple Query Wizard (continued) A query is based on a table or another query (or multiple tables/queries) When you open a query object, you run the query. Running a query displays a datasheet with only the records and fields that you asked to see. The Simple Query Wizard is an easy way to create a query. Access Lesson 3   6 Pasewark & Pasewark  Microsoft Office 2010 Introductory
  • 7. Creating a Query with the Simple Query Wizard (continued) First Simple Query Wizard dialog box Access Lesson 3  7 Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 8. Creating a Query with the Simple Query Wizard (continued) A detail query shows every field in each record. A summary query lets you summarize relevant data, such as adding the field values in a column that stores price data. Access Lesson 3   8 Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 9. Sorting Data When you view field values in ascending or descending order from A to Z or from smallest to largest, you apply a sort to the field. Sorting a field in ascending order arranges records from A to Z, or from smallest to largest. Sorting a field in descending order arranges records from Z to A, or from largest to smallest. Access Lesson 3   9 Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 10. Filtering Data Access Lesson 3  10  A filter temporarily displays records in a datasheet based on the condition that you specify. You can use different types of filters to display the data you need. When you use Filter By Selection, you select a field value, and then click the Selection button in the Sort & Filter group on the Home tab. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 11. Filtering Data (continued) Access Lesson 3  11  You can use Filter By Form to display records that contain one or more values based on the values stored in one or more fields. Click the Advanced button in the Sort & Filter group on the Home tab. Click the Toggle Filter button in the Sort & Filter group on the Home tab to display only records in the datasheet that match the filter. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 12. Filtering Data (continued) Access Lesson 3  12  An easy way to sort and filter data is to use an AutoFilter. An AutoFilter is a menu that opens when you click the arrow on the right side of a field selector, and contains options for: – – Sorting data and clearing filters. Using Filter By Selection and Filter By Form. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 13. Filtering Data (continued) AutoFilter for the Product Name field (a Text field) Access Lesson 3  13 Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 14. Creating a Query in Design View Access Lesson 3  14  For a query datasheet, you have more sorting and filtering options when you create or modify a query in Design view. In the Query Design window, you build and change the query using the design grid. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 15. Creating a Query in Design View (continued) Access Lesson 3  15 The Query window in Design view is divided into two parts. – –  The top shows the field list for the table you included in the query design. The bottom contains a design grid that allows you to specify fields, conditions, and sort orders. A query can contain one, some, or all of the fields in the table. You can add the fields in any order to the design grid. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 16. Creating a Query in Design View (continued) Access Lesson 3  16   You can set a sort order for a field using the field's Sort box in the design grid. You can run a query by clicking the Run button in the Results group on the Query Tools Design tab. When you run a query, the results appear in a query datasheet. To add a condition to a field, click in the field's Criteria box, and then type the condition. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 17. Creating Table Relationships Access Lesson 3    17 The feature that lets you connect the data in the tables is a relationship. To create a relationship between two tables, you must design the tables so they contain a common field. A common field is a field that appears in both tables, has the same data type, and contains the same values. A common field is also called a matching field. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 18. Creating Table Relationships (continued) Access Lesson 3  18 The most common relationship is a one-tomany relationship. –  One record in the first table can match many records in the second table. The common field in the related table is called a foreign key when it is used in a relationship. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 19. Creating Table Relationships (continued) Access Lesson 3  19  When you relate tables, Access uses a set of rules to ensure that there are matching values in the common field used to form the relationship. This set of rules is called referential integrity. Referential integrity protects the data in the tables to make sure that data is not accidentally deleted or changed, resulting in inconsistent data. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 20. Creating Table Relationships (continued) Relationships window after creating a one-to-many relationship Access Lesson 3  20 Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 21. Creating a Multitable Query Access Lesson 3  21  Queries based on more than one table are sometimes called multitable queries. After you add two related tables to the query design, a join line shows the relationship. – – The join line connects the common field used to relate the tables. It defines the type of relationship by using the "1" to represent the "one" and the infinity symbol to represent the "many" side of the relationship. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 22. Using Operators in a Condition Access Lesson 3  22    In an exact match condition the records must contain the specified value. In a range-of-values condition the record must match a range of values. The And operator selects records that match all of two or more conditions in a query. The Or operator selects records that match at least one of two or more conditions in a query. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 23. Using Operators in a Condition (continued) Relational operators Access Lesson 3  23 Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 24. Calculating Data Access Lesson 3  24 Access provides two ways to calculate data using a query: – – Total Row: Use the Total row to count the number of values in a column. The Total row includes additional functions for values. Calculated Field: A field with a value calculated using other fields is called a calculated field. The calculation is called an expression. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 25. Access Lesson 3 Summary 25 In this lesson, you learned:  A query is a database object that lets you ask the database a question about the data it contains. You can create a query quickly and easily using the Simple Query Wizard, which asks you about the data you want to see and lets you select options in dialog boxes.  You can change the way data is sorted in a datasheet by applying an ascending or a descending sort order to one of the fields. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 26. Summary (continued) Access Lesson 3  26 You can use a filter in a datasheet to temporarily display records in a datasheet based on a condition that you specify. Filter By Selection lets you select a field value or part of a field value in a datasheet and then filter out all records that do not match the filter. Filter By Form lets you display records that match a value you select in a field. An AutoFilter opens when you click the arrow on a field selector. You can use an AutoFilter to sort and filter data. You can also move and sort fields in Design view. To run a query, click the Run button in the Results group on the Query Tools Design tab. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 27. Summary (continued) Access Lesson 3  27  When you need to create a query that uses conditions to select records, create the query in Query Design view. Use the Relationships window to create relationships between tables in a database by joining tables with a field that contains matching field values. A one-to-many relationship exists when one record in the primary table matches zero, one, or many records in the related table. Referential integrity is the set of rules that Access uses to protect data in the tables and to make sure that data is not accidentally deleted or changed. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 28. Summary (continued) Access Lesson 3  28  A multitable query is a query that is based on more than one table. When you need to use a query to search for records that match a range of values, use a relational operator in the query design. When you need to select records that match all of two or more conditions in a query, use the And operator by placing the criteria in the same Criteria row in the design grid. When you need to select records that match at least one of two or more conditions in a query, use the Or operator by placing the first condition in the Criteria row and the second condition in the or row in the design grid. Pasewark & Pasewark Microsoft Office 2010 Introductory
  • 29. Summary (continued) In Access, you can perform calculations by using the Total row in a datasheet, or by creating a calculated field in the design grid in Query Design view. Access Lesson 3  29 Pasewark & Pasewark Microsoft Office 2010 Introductory