| Step by step exercise. Update queries |
| Objective. |
| Practice the procedures for creating Update queries.
|
| Exercise 1. |
|
1 Open the Classes.mdb database. 2 Position yourself in the Queries tab of the Database window. 3 Click on the Create query in Design view option. 4 Click on the Courses table. 5 Click on the Add button. 6 Click on the Close button to close the dialogue box. We will now add the fields that we need (those that we to update and those that we need to add in the search criteria, in our exercise we want to update all the courses and so we will not put a search criteria), we will only add Hours. 7 Double click on the Hours field. 8 Drop down the 9 In the Update to: row Type [Hours]*1.1 or if you prefer [Hours] + ([Hours]*10/100). 10 Click on the 11 Close the query, name it Increase by 10 percent.
|
| Exercise 2. |
|
A condition needs to be added so that only these courses are updated. 1 Open the Classes.mdb database. 2 Position yourself in the Queries tab of the Database window if you are not already there. 3 Click on the Create query in Design view option. 4 Click on the Courses table. 5 Click on the Add button. 6 Click on the Close button to close the dialogue box. 7 Double click on the Hours field which is the field we want to update. 8 Double click on the Course name field which is the field we are going to use in the search criteria. 9 Type Computers in the Criteria: row of this column so that only these courses are updated. 10 Drop down the 11 In the Update to: row type [Hours] + 2 . 12 Click on the 13 Close the query, name it Update Computers courses.
|
|
|
|
Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
|
|
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited.
April-2006.
|