Microsoft Access 2010 Chapter 7 Using SQL Camashaly Design database AC 418 – AC 457
Read and work through project 7 pp. AC 418- AC 457.
The owners of Camashaly Design want to be able to use the extended data management capabilities available through SQL. In becoming familiar with SQL, Camashaly would like to create a wide variety of SQL queries.
Similar to creating queries in Design view, SQL provides a way of querying relational databases. In SQL, however, instead of making entries in the design grid, you type commands into SQL view to obtain the desired results, as shown in Figure 7 – 1a. You then can click the View button to view the results just as when you are creating queries in Design view. The results for the query in Figure 7 – 1a are shown in Figure 7 – 1b.
Overview
As you read through this chapter, you will learn how to create SQL queries by performing these general tasks:
• Create queries involving criteria.
• Sort the results of a query.
• Group records in a query and perform group calculations.
• Join tables in queries.
• Create a query that involves a subquery.
• Update data using the INSERT, UPDATE, and DELETE commands.
SQL Query Guidelines.
When querying a database using SQL, you must design queries appropriately, identifying the required fields, tables, criteria, sorting, grouping, and operations to use. Querying in SQL also requires proper expression of queries using SQL clauses and formatting.
1. Select the fields for the query. Examine the requirements for the query you are constructing to determine which fields are to be included.
2. Determine which table or tables contain these fields. For each field, determine the table in which it is located.
3. Determine criteria. Determine any criteria that data must satisfy to be included in the results. If there are more than two tables in the query, determine the criteria to be used to ensure the data matches correctly.
4. Determine sort order. Is the data to be sorted in some way? If so, by what field or fields is it to be sorted?
5. Determine grouping. Is the data to be grouped in some way? If so, by what field is it to be grouped? Identify any calculations to be made for the group.
6. Determine any update operations to be performed. Determine whether rows need to be inserted, changed, or deleted. Determine the tables involved.
When necessary, more specific details concerning the above decisions and/or actions are presented at appropriate points in the chapter. The chapter also will identify the use of these guidelines in creating SQL queries such as the one shown in Figure 7 – 1.
To Start Access
The following steps, which assume Windows 7 is running, start Access based on a typical installation. You may need to ask your instructor how to start Access for your computer.
Click the Start button on the Windows 7 taskbar to display the Start menu.
Type Microsoft Access as the search text in the ‘Search programs and files text box and watch the search results appear on the Start menu.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more