4. MICROSOFT ACCESS QUERIES

4.4: Sorting the Result

Sometimes an end user wants to see data in a particular order. Let us extend the previous example so books are listed in alphabetic order by title and, since they are all paperbacks, we will not display the paperback field.

Create another query similar to the last one. Now, place the cursor in the Sort line beneath the title field: click and select ascending from the choices. Then click the Show check box for paperback to turn Show off.

 

image
     Figure 4.12: Query results can be sorted

Save this query and run it. Notice how the results are sequenced by title.

 

Exercises

1) List the titles of books in descending order.

 

2) List the titles of books written by Joe Celko.

 

3) List all members of the library.

 

4) List the members in sequence by last name.

 

5) List the members sequenced by last name and then by first name. (If members have the same last name they appear on consecutive lines, and those lines are in sequence by first name.)

 

6) Which of the above are a) simple queries, b) selection queries, c) projection queries, d) both selection and projection queries?

License

Share This Book