Access: Queries I Participation Project

Slides:



Advertisements
Similar presentations
Name: Tatiana “Tania” Harrison
Advertisements

Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
Querying a Database Using the Select Query Window
Creating And Maintaining A Database. 2 Learn the guidelines for designing databases When designing a database, first try to think of all the fields of.
Chapter Extension 6 Using Microsoft Access © 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke.
Access Tutorial 10 Automating Tasks with Macros
Chapter 2 Querying a Database
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
Chapter 3 Maintaining a Database
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
Microsoft Access Get a green book. Page AC 2 Define Access Define database.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
Access Review. Creating tables Define the tables before start creating in Access –use the DB design materials –define the type of fields and length Create.
Microsoft ® Access ® 2010 Training Create Queries for a New Database If a yellow security bar appears at the top of the screen in PowerPoint, click Enable.
XP New Perspectives on Microsoft Access 2002 Tutorial 21 Microsoft Access Tutorial 2 – Creating And Maintaining A Database.
XP 1 Microsoft Access 2003 Introduction To Microsoft Access 2003.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Microsoft Access. Microsoft access is a database programs that allows you to store retrieve, analyze and print information. Companies use databases for.
What are queries? Queries are a way of searching for and compiling data from one or more tables. Running a query is like asking a detailed question of.
Microsoft Access 2000 Presentation 3 Creating Databases Part II (Creating Forms)
CS 281 – Fall 2015 Lab 4 Parametric Query and Forms in MS Access.
MS-Access XP Lesson 4. Modifying Queries 1.Select query in queries 2.Click design button or Right click on query and click design view 3.Change query.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
Databases Competency Explain advanced database concepts and functions.
Microsoft Access Prepared by the Academic Faculty Members of IT.
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
CS 281 – Fall 2010 Lab 4 Parametric Query and Forms in MS Access.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 5 BACKNEXTEND 5-1 LINKS TO OBJECTIVES Using the Form Button Using the Form Button Form Views.
June 17, 2009 Office 2007 Tips & Tricks.
Tutorial 1 Creating a Database
Using Macros, Switchboards, PivotTables, and PivotCharts
Maintaining a Database Using the Design and Update Features of Access
Access Tutorial 1 Creating a Database
Practical Office 2007 Chapter 10
Access Chapter 2 Querying a Database.
Analyzing Data Using Access
Microsoft Access – Tutorial 3
Objectives Query for top values Create a parameter query
Plug-In T7: Problem Solving Using Access 2007
Objectives Create an action query to create a table
Querying a Database Using the Select Query Window
Access Creating a Database
Access Creating a Database
Microsoft Office Access 2003
Access Tutorial 1 Creating a Database
MODULE 7 Microsoft Access 2010
Microsoft Office Access 2003
Tutorial 3 – Querying a Database
Microsoft Office Access 2003
Excel: Excel Basics Participation Project
Introduction to Database Programs
Access: Access Basics Participation Project
Chapter 1 Databases and Database Objects: An Introduction
Microsoft Office Access 2003
Access: Queries IV Participation Project
Access: Queries II Participation Project
Access Review.
Access: Forms Participation Project
Access: Queries III Participation Project
Excel: Tables Participation Project
Access: Reports Participation Project
Access Tutorial 1 Creating a Database
Introduction to Database Programs
Access Tutorial 1 Creating a Database
Tutorial 9 Using Action Queries and Advanced Table Relationships
Assignment 3 Querying and Maintaining a Database
Presentation transcript:

Access: Queries I Participation Project WV K-12 Education Problem WV Senate Problem

Topics Covered Create a single table query Use sorting in a query Use multiple tables in a query Sort on multiple fields Use a SQL SELECT query

Queries Queries display information from one or more database tables. Input table Queries display information from one or more database tables. Queries are the key element of relational databases. If you didn’t have queries, there wouldn’t be a reason to use a database. Bob $100,000 Sally Fred $200,000 Jane $300,000 Query: “Show me people who make $100,000” Results Bob Sally

Create a Single-Table Query: Part 1 The simplest queries retrieve records from a single table. Go to the Create ribbon. In the Queries group, click the Query Design button. Query Wizard is very basic and not recommended

Create a Single-Table Query: Part 2 In the Show Table dialog box, double-click on the table(s) containing the fields you will use in this query. Only include: The tables with the fields you need to display, set criteria on, or sort by The other tables needed so there are relationship lines connecting all of the tables you have added Don’t add unnecessary tables. Click Close when done.

Create a Single-Table Query: part 3 In the table(s) at the top of the query, double-click on the names of the field(s) you wish to display, sort by, or set criteria on. Added fields will show in the query grid at the bottom You can drag to reorder fields if needed

Create a Single-Table Query: Part 4 Once you have finished building your query, click the Save button on the Quick Access Toolbar. Give your query a descriptive name when prompted. For CS101 assignments, name the query after the step in which it appears like Query3A Click the OK button to save.

Create a Single-Table Query: part 5 Go to the Table Tools Design ribbon. Click the Run button to run your query.

Create a Single-Table Query: part 7 Look at the results to ensure they appear correct. CS101 assignments will generally list the number of records and fields that should be shown If the results look OK, click the X button to close the query. Otherwise, click Query Design button to edit the query further.

SorTing Query results can be sorted in ascending (alphabetical/smallest to largest) or descending (reverse alphabetical/largest to smallest order). When results are sorted by multiple fields, Access sorts the fields in order from left to right. You can drag the fields around to reorder them to the desired sort order You can also turn off the Show option and add multiple instances of fields if you need fields to be displayed in a different order than they are sorted

Sort Query Results: Part 1 Open the query in Design View. In the Sort row of the query grid, select the Ascending or Descending options for the fields to be sorted. Leave this field blank for fields not to be sorted. If multiple fields are being sorted, drag the fields to reorder them so the fields being sorted first appear further to the left.

Use Multiple Tables in a Query Creating queries with multiple tables is nearly identical to creating single-table queries. Difference is adding multiple tables rather than a single one in Show Table dialog box Be sure to define your relationships before creating a multi-table query. Relationships added after won’t be reflected in the query. There should be relationship (join) lines connecting all of the tables shown in the query.

SQL Select Queries Structured Query Language (SQL) is the language used to write database queries. Access uses SQL SELECT queries behind the scenes to retrieve your data. Design View is a graphical layer to make things easier to use. Sometimes, you may wish to write SQL yourself for complex queries.

Use a SQL Select Query: Part 1 Go to the Create ribbon. Click the Query Design button. Click Close on the Show table dialog box. Go to the Table Tools Design ribbon. Click the SQL View button.

Use a SQL Select Query: Part 2 Write or copy-and-paste your SQL query. Once you have finished building your query, click the Save button on the Quick Access Toolbar. Give your query a descriptive name when prompted. Click the OK button to save. Go to the Query Tools Design ribbon. Click Run to run the query.