Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Access 2003 Illustrated Complete

Similar presentations


Presentation on theme: "Microsoft Access 2003 Illustrated Complete"— Presentation transcript:

1 Microsoft Access 2003 Illustrated Complete
Creating Advanced Queries

2 Objectives Query for top values Create a parameter query
Modify query properties Create a make-table query Creating Advanced Queries Unit K

3 Objectives Create an append query Create a delete query
Create an update query Specify join properties Create find unmatched queries Creating Advanced Queries Unit K

4 Querying for Top Values
Use the Top Values feature in Query Design View to specify a number or percentage of records that you want to display Always sort records to establish the order or “top records” Creating Advanced Queries Unit K

5 Querying for Top Values
Top Values list arrow Totals button Count LogNo Group By Description Creating Advanced Queries Unit K

6 Querying for Top Values
Top Value options Creating Advanced Queries Unit K

7 Creating a Parameter Query
A parameter query displays a dialog box that prompts you for an entry The entry is used as criteria for the query The criteria narrows the number of records that appear in the datasheet You may build a form or report based on a parameter query Creating Advanced Queries Unit K

8 Creating a Parameter Query
Parameter prompt Parameter criteria Creating Advanced Queries Unit K

9 Modifying Query Properties
Properties are characteristics that define the appearance and behavior of database objects, fields, and controls View the properties for an item b opening its property sheet Creating Advanced Queries Unit K

10 Modifying Query Properties
Properties button Click here to select the query Query properties Creating Advanced Queries Unit K

11 Action Queries An action query changes many records in one process
To change data, click the Run button There are 4 types of action queries Update Make-Table Append Delete Creating Advanced Queries Unit K

12 Action Queries Action queries Creating Advanced Queries Unit K

13 Creating a Make-Table Query
A make-table query creates a new table of data based on the recordset defined by the query Creates a copy of the selected data and pastes it into a new table The location of the new table can be the current or any other Access database Creating Advanced Queries Unit K

14 Creating a Make-Table Query
Run button Creating Advanced Queries Unit K

15 Clues to Use: 1900 versus 2000 dates
Access assumes that the digits 00 through 29 are for the years 2000 through 2029 Access assumes that the digits 30 to 99 refer to 1930 through 1999 To specify years outside these ranges, type all four digits of the year Creating Advanced Queries Unit K

16 Creating an Append Query
An append query adds a selected recordset to an existing table called the target table Records are copied and pasted to the target table If the target table has more fields than those you want to append, the append query will ignore the unmatched fields Creating Advanced Queries Unit K

17 Creating an Append Query
Append Query button Append To: row Creating Advanced Queries Unit K

18 Creating a Delete Query
A delete query deletes selected records Delete queries delete entire records, not just selected fields within records Creating Advanced Queries Unit K

19 Creating a Delete Query
Delete Query button Delete: row Creating Advanced Queries Unit K

20 Clues to Use: Reviewing referential integrity
Referential integrity prevents orphan records A “many” table many have an orphan record when information in the foreign key field doesn't have a matching entry in the primary key field of the “one” table Creating Advanced Queries Unit K

21 Creating an Update Query
Update Query button Update To: row Creating Advanced Queries Unit K

22 Specifying Join Properties
By default, only records that have matching values in two related tables will appear in a query datasheet Default join properties can be changed in the Join Properties dialog box Creating Advanced Queries Unit K

23 Specifying Join Properties
Creating Advanced Queries Unit K

24 Specifying Join Properties
The Join line’s appearance shows that all records in the Courses table will be included in the datasheet Creating Advanced Queries Unit K

25 Creating Find Unmatched Queries
The Find Unmatched Query finds all records in the “one” table without a matching record in the “many” table There are no records in the “many” table without matching records in the “one” table if referential integrity is enforced Creating Advanced Queries Unit K

26 Summary Top values and parameter queries create special criteria to limit the selected records The four action queries (make-table, append, delete, and update) change data when they are run Queries and join lines have properties that can be modified Use the Find Unmatched Query Wizard to find records in one related table without matching records in the other Creating Advanced Queries Unit K


Download ppt "Microsoft Access 2003 Illustrated Complete"

Similar presentations


Ads by Google