Access Intermediate

Similar documents
Access Intermediate

Access Intermediate

Enforce Referential. dialog box, click to mark the. Enforce Referential. Integrity, Cascade Update Related Fields, and. Cascade Delete Related

Complete Quick Reference Summary

Objective 1: Familiarize yourself with basic database terms and definitions. Objective 2: Familiarize yourself with the Access environment.

Getting started with Ms Access Getting Started. Primary Key Composite Key Foreign Key

As your databases continue to evolve, you will need to incorporate advanced queries and reports. This chapter addresses how to create and use action

Creating a Crosstab Query in Design View

Table of Contents COURSE OVERVIEW... 5

Microsoft Access XP Queries. Student Manual

Access Intermediate

Name: Class: Date: Access Module 2

Using Microsoft Access

Follow these steps to get started: o Launch MS Access from your start menu. The MS Access startup panel is displayed:

New Perspectives on Access Module 5: Creating Advanced Queries and Enhancing Table Design

Open. Select the database and click. Print. Set printing options using the dropdown menus, then click the

Access - Introduction to Queries

Microsoft Access XP (2002) - Advanced Queries

Microsoft Access 2010

Introduction to Microsoft Access 2016

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex

Microsoft Access 2013

Microsoft Access 2013

Microsoft Access XP (2002) Queries

CartêGraph Training Navigator

Microsoft Access Illustrated. Unit B: Building and Using Queries

ADD AND NAME WORKSHEETS

Shelly Cashman Series Microsoft Office 365 and Access 2016 Introductory 1st Edition Pratt TEST BANK

Microsoft Access 2016 Intro to Select Queries

Using Microsoft Access

Access 2003 Introduction to Report Design

Database Design Practice Test JPSFBLA

Excel Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts. 6. You can use a table s sizing handle to add columns or rows to a table.

Level 6 Relational Database Unit 3 Relational Database Development Environment National Council for Vocational Awards C30147 RELATIONAL DATABASE

Microsoft Office 2010: Introductory Q&As Access Chapter 2

Microsoft Excel 2010 Handout

Tutorial 3 Maintaining and Querying a Database. Finding Data in a Table. Updating a Database

Microsoft Office Illustrated Introductory, Building and Using Queries

Rev. C 11/09/2010 Downers Grove Public Library Page 1 of 41

Microsoft Certified Application Specialist Exam Objectives Map

Excel Intermediate

Excel Tables and Pivot Tables

Using Microsoft Excel

Excel 2010: Basics Learning Guide

INTRODUCTION... 1 UNDERSTANDING CELLS... 2 CELL CONTENT... 4

Working with Macros. Creating a Macro

Excel 2007 New Features Table of Contents

Excel Tables & PivotTables

Veco User Guides. Grids, Views, and Grid Reports

DEVELOPING DATABASE APPLICATIONS (INTERMEDIATE MICROSOFT ACCESS, X405.5)

TECHNOLOGY COMPETENCY ASSESSMENT MODULE Microsoft Access

DESIGNING, BUILDING, AND USING DATABASES (BEGINNING MICROSOFT ACCESS, X405.4)

Chapter11 practice file folder. For more information, see Download the practice files in this book s Introduction.

Microsoft Access 2016

Microsoft Access 2016

EXCEL TUTORIAL.

Access Module 2: Building and Using Queries

Preview. MS Access Tutorial. Data Files Available on

eschoolplus+ Cognos Query Studio Training Guide Version 2.4

Using Reports. Access 2013 Unit D. Property of Cengage Learning. Unit Objectives. Files You Will Need

Links to Activities ACTIVITY 4.1. Links to Activities Links to Activities

Rev. B 12/16/2015 Downers Grove Public Library Page 1 of 40

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201

EXCEL 2003 DISCLAIMER:

Using Microsoft Access

Word Module 5: Creating and Formatting Tables

STIDistrict Query (Basic)

Advanced Queries: Moving Beyond the Select Query Instructor: Edwin V. Bonilla

Microsoft Office Access Learn how to use the Query window in Design view. Tutorial 3b Querying a Database

ICDL & OOo BASE. Module Five. Databases

CHAPTER 6 SUMMARY. Objective 1: Identify Good Database Design

Using Microsoft Access

MIS Cases: Decision Making With Application Software, Second Edition. Database Glossary

Access Review. 4. Save the table by clicking the Save icon in the Quick Access Toolbar or by pulling

Microsoft Access II 1.) Opening a Saved Database Music Click the Options Enable this Content Click OK. *

Microsoft Excel 2010

Database Use & Design

Microsoft Access Basics

EXCEL BASICS: MICROSOFT OFFICE 2010

Excel Intermediate

Tutorial 5 Advanced Queries and Enhancing Table Design

Using Microsoft Access

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Blackboard for Faculty: Grade Center (631) In this document:

Chapter 4: Single Table Form Lab

Microsoft Access 2010 Select Queries

Numbers Basics Website:

Microsoft Access 2016 Intro to Forms and Reports

When you pass Exam : Access 2010, you complete the requirements for the Microsoft Office Specialist (MOS) - Access 2010 certification.

ACCESS 2007 FOUNDATION

Microsoft Word 2010 Introduction to Mail Merge

PowerPoint Presentation to Accompany GO! All In One. Chapter 13

Intro to Excel. To start a new workbook, click on the Blank workbook icon in the middle of the screen.

Introducing Gupta Report Builder

EXCEL BASICS: MICROSOFT OFFICE 2007

Application of Skills: Microsoft Excel 2013 Tutorial

Microsoft How to Series

Microsoft Access 2010 For the End User. 9/12/2011 Archdiocese of Chicago Mike Riley

The specific steps to build Wooden Crafts database are here: 1. Create New Database. i. After opening Access, click Blank Desktop Database :

ENTERING DATA & FORMULAS...

Transcription:

Access 2010 - Intermediate 103-134 Advanced Queries Quick Links Overview Pages AC116 AC117 Selecting Fields Pages AC118 AC119 AC122 Sorting Results Pages AC125 AC126 Specifying Criteria Pages AC132 AC134 AC139 AC145 Wildcards Pages AC204 AC209 AC221 AC223 Relational Queries Pages AC110 AC111 Calculated Fields Pages AC145 AC150 AC224 - Using Conditional Functions Pages AC228 - AC Aggregate Fields Pages AC151 AC155 Parameter Queries Pages AC215 AC219 Top Value Queries Pages AC249 AC251 Update Queries Pages Delete Queries Pages Crosstab Queries Pages AC209 AC226 Finding Duplicate Records Pages AC246 AC247 Finding Orphan Records Pages AC247 AC249 Using SQL View Pages This icon designates a video is available as an additional reference. Video DVD is available in the Stevens Point library Queries Access 3: Introduction to Queries Queries allow the user to extract data from a database, across multiple tables. Queries can also show calculated data data that is not stored in the database. Queries can also be used to update data in a table or delete data from tables. 1

Select Queries Select queries are one way for the user to extract data from database tables Select the Create Ribbon, then the Query Design button in the Queries group. Select the tables to be used in this query If you miss one, you can add it later The QBE Grid appears Query by Example Table-like object in the bottom of the window Select the fields to be included in the query Double-click a field name to add it to the end of the list of fields in the QBE grid Can drag fields from the field list to the grid and drop (inserted before the field you drop it on) Ctrl-Click fields to select more than one Ctrl-Click again to remove from selected list Shift-Click to select a range of fields Can select all the fields by double-clicking the table name (all fields will highlight) then drag to grid. Changing the fields selected To select an existing field in the grid, point to the thin gray bar above the field name. Cursor should change to a thick, black arrow. Click to select, drag to select multiple columns (fields). Remove Fields Select the field(s) Press the delete key on the keyboard Move Fields Select the field(s) Point to the bar above the field until the cursor changes to a white arrow. Drag to new location (dark bar shows drop location) Create a query based on the Courses table Experiment with all techniques, then select all Remove the Description field 2

Executing (Running) the Query View button gives you a preview of the queries results Run query and then return to design mode Executes the query Preview and Execute are basically the same when doing Select Queries. They have different results when doing Update or Delete Queries. To return to design mode, click mode) (only appears in run Specifying the Sort Order Unless you specify otherwise, records in the query result are sorted by primary key Click in the Sort row of the field you want to sort by Choose the sort order Ascending (A-Z, 1-10) Descending (Z-A, 10-1) Note you can also remove sorting here You can choose a secondary sort key This field will be used when the data in the primary sort field is the same (tie breaker) NOTE: Secondary sort keys must always appear to the right of the primary sort key (there can be fields between them). You can change the display order in datasheet view (query results) if you need the fields to show in a different order. You can add third, fourth, etc sort keys if you need to Sort by Credits (desc), then by Course Name (asc). Run query, note incorrect sort order. Move Credits to the left of Course Name, run query again. Note tie breaker when credits are the same. 3

Specifying Query Criteria Access 3: Defining Record Selection Criteria for Queries Access 3: Defining Multiple Selection Criteria for Queries Criteria allow you specify criteria (conditions) that a record must meet in order to be included in the query results Specified in the Criteria rows of the QBE grid Click in the Criteria row of the field that the criteria applies to Comparison operators: > greater than >= greater than or equal to < less than <= less than or equal to <> not equal to = equal to (optional) not reverse result of condition Specifying different data types Surround text that is entirely comprised of digits with quotes Surround dates and times with # Tip: Try entering the criteria without the quotes or #. Often, Access will insert them automatically. If not, add them manually Credits > 3 Credits >= 3 See below 4

Wildcard * * represents any character, any number of characters, or no characters. Basically, * represents anything *smith matches any string that ends in smith also matches simply smith smith* matches any string the starts with the letters smith also matches simply smith *smith* matches any string of characters that contains smith anywhere, beginning, middle or end. Also matches simply smith Completely case insensitive Access adds the word Like to the criteria to make it compatible with standard SQL syntax. Tip: To use the wildcard with dates, specify the date in m/d/yyyy format. E.g. Like 7/*/2011 Between And Matches all numbers between the first number and the second number, including those two numbers Can also be used with text and dates In(value1, value2, value3 ) Matches all values that are contained in the list Can be used for numbers or text Multiple Criteria You can specify criteria for more than one field Records must match each criteria to be included in the query results AND condition (match this AND that AND that) Can also specify OR conditions match one criteria OR the other (or both) list each criteria in a different row (even if in different fields) Each row is considered a new criteria. If mix AND and OR conditions, must specify AND criteria in all rows Course Number 152* New query on Section (all fields) Start time between 9 and 12 (Use #) Semester in 1082, 1084 Combine time 9-12 and semester (1082, 1084) M or T And 3 credits 5

Renaming Fields in Query Results Can change the name of a field in the query result column header Most frequently used for calculated fields Place the desired field name before old field name (or equation) and separate with a colon (:) NOTE: Captions in table design override these names Specifying Criteria for Lookup Fields Remember that lookup fields actually store the primary key value (StudentID, Course Number) not the values shown in the lookup lists. You cannot specify a criteria of Like Prog* in the course lookup field To resolve this problem, use a relational query that combines fields from multiple tables (see next section) Change Section to Section Number (still Section #) Change Days to Meeting Days Try searching for all programming classes Prog* (no results) Relational Queries Relational queries allow you to combine results from more than one table. Build query exactly the same way except add more than one table To add a table at a later time, click the Show Table button in the Query Setup group of the Query Tools Design Ribbon If table relationships are not defined, define them here Drag field from parent to matching field in child Add fields from any table in any order Lookup fields will automatically show the lookup value (from table design mode) If don t want the lookup, add the key from the parent instead of the linking field from the child Sort using any fields from any combinations of tables Specify criteria from any fields from any tables Add Courses, Enrollments and Students tables to a new query Add Sections Lname, Fname, Course Number (from section), Semester, Section, Credits Earned Where semester is 1076 Note course number converted to course name. Replace course number with course number and name from Courses Find Programming courses Taken by Ambrose 6

Creating Calculated Fields Access 3: Creating a Calculated Field With the power of today s computers, Access can quickly combine data from multiple fields into equations that calculate new values that are not stored in the data but only appear in the results of a query. Calculated fields can also be included in forms and reports Because of this fact, most database designers remove all fields from the database that can be calculated and use queries to calculate the values only when needed. The true power comes from Access ability to combine fields from multiple tables in one equation The easiest way to create calculated fields in Access is to use the Expression Builder The Expression Builder allows you to select fields from a list and operators from a list to create complicated (or simple) equations. The alternative is to type the field names and operators manually, which is more susceptible to errors. 7

Create a query in design view Add non-calculated fields to the query Optional. A query can be comprised of just calculated fields, or the calculated fields can precede the non-calculated fields. Often, the support data used in the calculation is included in the query as well. Tip: If you include non-calculated fields, save the query before defining your calculated fields. The query s fields will display in the Expression Builder s Expression Categories column Click in the next available QBE column Field row Click the Expression Builder button in the Query Tools Design tab, Query Setup group. In the Expression Categories column (center), doubleclick the field name to insert it into the expression Access includes [square brackets] around field names (in case they have spaces in them) If the field doesn t appear in the Expression Categories column (did you save the query?), in the Expression Elements column: Click the + next to the database name Click the + next to Table Click the appropriate table name The fields for that table will appear in the Expression Categories column Enter operators for the equation by typing them + - * / Order of precedence (like in Excel) applies * / are processed first, followed by + - Use parentheses to override order of precedence Repeat for all fields and operators to be included in the equation Use regular editing techniques (delete, highlighting, etc) to change the expression if necessary 8

Access will not verify the validity of your equation until you try to run the query. Error messages often don t help determine what s wrong. To correct the error, click the calculated field in the QBE and launch the Expression Builder again. The Expression Builder will already include the equation you entered previously. Proofread your equation to uncover the error. If you get the Enter Parameter Value dialog box, you inserted a field in the equation that Access doesn t recognize. Naming the Calculated field By default, Access names the calculated field Expr# This name is not very handy if you need to refer to the field at a later time (form, report or another query) One technique you could use is to change the field s Caption using its properties (see Formatting Calculated Fields below) I prefer to add the name of the field in the QBE grid itself. Point to Expr# at the beginning of the equation in the QBE grid Double-click Expr# to select it. Type a new name for the field. CAUTION: don t delete the colon ( : ) that follows the field name. It must be there to separate the field name from the equation. Tip: You can enter the field name in the Expression Builder. Precede the expression with your field name followed by a colon. Tip: Don t include spaces in your calculated fields (unlike the book examples). Put spaces in the caption (see below) just like you did with regular fields in Tutorial 2. 9

Formatting Calculated Fields Normal fields have their formatting designated in the query s design structure, but calculated fields are not included in the structure. To change the formatting of a calculated field, you must access it s properties Right-click the field and select Properties from the popup menu Or, click the Property Sheet button in the Query Tools Design tab, Show/Hide group In the Properties dialog box, designate the format for the field and if appropriate the number of decimal places. Tip: You can leave the Properties dialog box open and format multiple fields. Tip: Select multiple fields (see above) to change all their properties to the same values at once. You can also designate a Caption for the calculated field in the Properties window. You can use a calculated field as a sort field in a query You can include criteria in calculated fields. To use a calculated field to create another calculated field, you must first save the query. When you then reopen the Expression Builder, the calculated field will be included in the Expression Categories list Concatenation is a programming term for sticking two (or more) strings together. Handy in many database queries Operator is & or + Can include string literals which are characters that are surrounded by apostrophes or quotes (pick one) These characters appear in the concatenation exactly as you type them. Format Stock Value for standard, 2 Add caption (with space) Sort by Stock value descending Save as qrycalculation tblcustomer concatenate last and first names, area code and phone Save as qryconcatenation 10

Using Conditional Functions in Calculated Fields If you watched closely, you may have noticed that Access comes with many predefined functions that you can use to create calculated fields (similar to Excel functions) Two convenient functions are ISNULL and IIF ISNULL is a Boolean function (results in True or False) that allows you check to see if a field has been left blank. You cannot check for blank fields by using =0 or = "" The function is easy to use. Simply insert the field name you want to check inside (parentheses) that follow the field name. Ex. ISNULL(MobilePhone) Be sure to use the field name, not the caption. ISNULL is typically used with an IIF statement IIF (Immediate IF or Inline IF) allows you to ask a Yes/No question and process one way if the answer is yes and a different way if the answer is no. IIF(condition, true processing, false processing) IIF includes three parts after the parenthesis Condition to be checked must result in a yes/no answer often uses the relational operators used to designate criteria Boolean functions like ISNULL are also commonly used here True processing What should be done if the condition is true False processing 11

Examples IIF(gender="F", "Ms.", "Mr.") Results in Ms. for females and Mr. for males IIF(ISNULL(Company), LastName & ", " & FirstName, Company) Split over three lines for readability Classic example from book. Customers may be companies or individuals. If the Company field is blank (null), individual s last and first name (concatenated) are used. If the Company field is not blank (false), company name is used. Note how quotation marks surround actual text values (could use apostrophes as well) Summary / Aggregate Fields Aggregate fields combine data from many records to calculate statistics: sum, average, min, max, count Select the fields to calculate statistics for (add to QBE grid) (you can list fields more than once Click the Totals button on the toolbar A new Total: row will be added to the QBE grid For each field, select the statistic you want calculated in the Totals row You can also specify criteria for records to be added to the aggregate query. Set Totals row to Where Specify criteria Grouping totals In addition to calculating totals, you can also calculate subtotals by grouping the statistics. Grouping creates subtotals for each unique value found in the grouping field. You can create multiple levels of grouping Select Enrollments and Sections tables Select Semester, CreditsEarned Specify 1082 as the criteria for the Semester row. Run query Group by Student (ID) Lookup automatically changed to name Remove criteria, run query Add additional grouping by semester (Desc) 12

Parameter Queries Access 5: Creating a Parameter Query Sometimes, the criteria for a query is not known at design time; we want the user to enter the criteria when the query is run. Parameter queries allow the user to enter criteria when the query is run In the criteria row for the appropriate field, enter a prompt describing what information the user should enter. SURROUND THE PROMPT WITH [SQUARE BRACKETS ]. Set Semester Totals row back to Where (remove sort) Enter a parameter query for semester. Run the query Try a wildcard 108? That s it!!! When the user runs the query, a dialog box appears first, asking the user to enter the appropriate value (using the prompt you specified. You can specify more than one parameter in a query. Multiple dialog boxes will appear, one after the other. Users can be allowed to enter wildcards in the parameters, but the parameter must be preceded by Like You can also include relation operators (< > etc.) in the criteria before the parameter. Tip: for even more flexibility (for the user) include wildcards around the parameter. Like * & [Enter a color:] & * Matches any record that contains the color the user entered If user enters blue this will match Blue Green, Light Blue, etc. This has a side effect of displaying all records if the user enters nothing for the prompt. Without the wildcards, if the user enters nothing, nothing ends up in the result set. Tip: To run a parameter query again without switching back and forth between Design and Datasheet view, press the F5 key in Datasheet view or click the Refresh All button in the Home tab, Records group. 13

Top Value Queries Often, you (or management) will not want to see all the records in a result set, but only the top records. Only the top 10% of students are honor students Access makes this very easy. Key Concept: In order to generate a top query your query must be sorted on the correct field. To find the honor students, you have sort by GPA, descending. First specifying all query requirements (fields, criteria, sorting) Tip: Sort ascending to find the bottom and descending to find the top Next, use the Return: option in the Query Tools Design tab, Query Setup group to designate which records should be included. Click the dropdown arrow to select from commonly used options Alternatively, type the number or percent of records you want to see in the Return: box. Run the query. 14

Update Queries Update queries allow you to change values in multiple fields in many records with one command. I suggest you test the query in Select mode first to ensure the correct records are selected before running the Update query. It s not a bad idea to create a backup copy the database before doing update or delete queries. Create a new query like always. Select fields and specify criteria to designate which rows should be changed. Designate you want to make an update query by clicking New query on Sections Change the start time for all Business Law courses to 8 a and end time to 10 a Preview Run Convert to Select query Check results the Update button in the Query Type group of the Query Tools Design Ribbon Enter data in the Update To: row for the appropriate field whose value should be changed. Click the View button on the toolbar to preview the records that will be changed. Not much help, but a good double-check Click the Run button on the toolbar to actually execute the update query THERE IS NO UNDO FOR THE UPDATE QUERY!! 15

Delete Queries Delete queries allow you to delete records that meet specified criteria It s not a bad idea to create a backup copy the database before doing update or delete queries. Create a new query like always Designate you want to make a delete query by clicking For information only. the Delete button in the Query Type group of the Query Tools Design Ribbon Select the fields and criteria necessary to designate the records to be deleted. Click the View button on the toolbar to preview the records that will be changed. Not much help, but a good double-check Click the Run button on the toolbar to actually execute the update query THERE IS NO UNDO FOR THE DELETE QUERY!! 16

Crosstab Queries Access 5: Creating a Crosstab Query Crosstab queries create tables of statistics for two fields Crosstab queries are very similar to PivotTables created in Excel This is one kind of query that I use the Query Wizard (Create Ribbon, Queries group) to help with the process. Click the Query Wizard button. Select the Crosstab Query Wizard Select the table that contains the appropriate data Select the field to be used as the row heading Multiple fields create subtotals Select the field for the columns Tip: I think about how many unique values the row header field and column header field will have. The field with most unique values generally works best as the row header Columns and rows can be reversed with no effect on the data and reversing them is pretty easy to do in Design mode. Select the field and the statistic to be calculated Name your query Note that the wizard automatically creates an extra column that holds the total for each row in the crosstab Check out Design view. Many features could be customized. Crosstab, Update and Delete queries get different kinds of icons in the Navigation Pane than Select queries and grouped (by type) in the Queries list. Create a query that lists all the courses taken by all the students in each semester and the credits earned. (Use qrystudentlu) Save as qrystudentcourses Create a crosstab query that shows the number of courses each student (row) has taken in each semester (col). Remove the total row If time allows, convert course count to credit count and include total 17

Dealing with Yes/No fields in Crosstabs If your column (maybe row) field is a Yes/No field, Access uses -1 (yes) and 0 (no) for the field values (column headings). This is usually confusing and unacceptable. To make the column heading more meaningful Switch to Design view. Zoom in on the Yes/No field column Use the IIF function to convert the -1/0 to more acceptable values Example: IIF(Fulltime, "Fulltime", "Part-Time") This checks the Fulltime field. If it is -1 (yes, true) the column heading displays Fulltime. Otherwise, the column heading displays Part-Time. Don t forget the quotes Finding Duplicate Records As mentioned in Unit 1, tables are often designed using artificial keys key values that are made up to simplify database design (E.g. CustomerID, StudentID) These kinds of fields are usually Autonumber fields. When you use these kinds of keys, Access cannot directly check to see if the database contains duplicate records because the Autonumber values are never duplicated. John Smith could accidentally be added to the database twice, be given two distinct CustomerID numbers and be sent all mailings twice. Though this can be annoying (getting two mailings) it will also cause inaccuracies in any statistics that are created be the duplicate record s values will be used more than once. A common query, Find Duplicates, can be used to locate duplicate records. 18

Because it s so common, Access includes a wizard to make the process easier. Create a query using the Query Wizard and select the Find Duplicates option. The wizard dialog boxes will guide you through the process. Select the table you want to find duplicate records in. Select the logical key field (or fields). These are the fields that you feel might contain incorrect, duplicate data (as opposed to fields where you expect duplicate data). Select additional fields you d like to see in the query results. These fields should include the primary key and might include other fields to help you verify which records are duplicated. Designate the name for the query. The query results will automatically be sorted by the logical key fields you selected, making recognizing duplicate records easier. Caution: when you delete the duplicate record be sure to delete the correct one. Also be sure to reassign and child records where the linking field value is the duplicate record ID to the correct record ID. Do you see why avoiding duplicate records in the first place is a good idea? Finding Orphan Records Orphan records are records in a child table that have no corresponding record in the parent table. An order record whose customer number doesn t exist A course section record whose instructor number doesn t exist. Access avoids orphan records by requiring you to select a linking field value that exists in the parent table if Referential Integrity is set for the relationship. Orphan records (in Access) are only possible if referential integrity is not on (and it always should be). NOTE: This type of query can also be used to find parent records without child records. Customers who have not placed orders Students who haven t registered for classes. 19

Access also includes a wizard for creating a Find Unmatched Query (what Access calls orphan records) Create a query using the Query Wizard and select the Find Unmatched option. The wizard dialog boxes will guide you through the process. First select the table that does have records Note this could be a query Select the table that you suspect has missing records Designate which field the tables have in common (linking field) Select the fields you want to see in the results. Select enough fields to help you recognize which records have issues. Name the query. The query results will show which records in the first table have NO corresponding records in the second table. Using SQL View Whenever you build a query in Access (any kind of query), Access automatically creates the SQL that corresponds to your query designations. SQL-Structured Query Language-is a (fairly) standard language used by all database programs to represent query requirements. Normally, you won t need to use this view, but if you were to start developing programs that manipulate databases, you ll have to become familiar with SQL. SQL View in Access can help you learn SQL. Create a query in Access using the QBE grid or a Wizard and then switch to SQL View to see the corresponding SQL Some extremely complex queries can only be created using SQL they are too complicated for the QBE grid Parameter queries created by Access do NOT transfer directly to other implementations of SQL To view the SQL for a query, click the View button in the Views group of the Home Ribbon and select the SQL View option. You can actually edit the query here if you know SQL. The QBE will reflect the changes if possible. 20