Example: Update Query

Query Design View: Update QueryIn the LanguageArtsClasses database there is a set of update queries that assign a letter grade to scores. Let's look at the query Assign A to >=94.

Problem: I need to convert number grades to letter grades.

Solution: Create a set of update queries, one for each letter grade.

Steps in the Process:

The example query uses only one table, Scores, and only two fields from that table, LetterGrade and Score. The update query looks at the value in the Score field. If it meets the criteria >=94,  then the LetterGrade field is updated to A, the value in the row Update To. Similar queries have criteria for other grade ranges and assign the correct letter grade for each one.

The advantage of using update queries to assign letter grades is that they won't make a mistake! And, it avoids a lot of data entry. I really liked that part!

Icon: Experiment Experiment: In the LanguageArtsClasses database, enter some scores in the Scores table for A/T ID 88, the partial records that were added the example Append query. Run the various update queries to assign letter grades to those scores.

Lessons Databases Appendix

Teachers: Request permission to use this site with your class
Copyright 1997-2012 Jan Smith   <jegs1@jegsworks.com>
All Rights Reserved

Icon: DonwloadIcon: CDWant a local copy with no ads? - Download/CD

Want to help?

~~  1 Cor. 10:31 ...whatever you do, do it all for the glory of God.  ~~

Last updated: 30 Apr 2012