Databases

  1. Home
  2. Computing & Technology
  3. Databases

"MODIFYING A QUERY" > Page 1, 2, 3

V. Sorting the Results

The human mind prefers to work with data presented in an organized fashion.  For this reason, we often desire to sort the results of our queries based upon one or more of the fields in the query.  In our example, we want to sort the results alphabetically based upon the product's name.

1.  Click the Sort entry for the appropriate field.  Single click in the Sort area of the field entry and a black down arrow will appear.  Single click on this arrow and you'll be presented with a list of sort order choices.  Do this for the Products.ProductName field in our example.

2.  Choose the sort order.  For text fields, ascending order will sort alphabetically and descending order will sort by reverse alphabetic order.  We want to choose ascending order for this example.

That's it!  Close the design view by clicking the "X" icon in the upper right corner.  From the database menu, double click on our query name and you'll be presented with the results shown below -- exactly what our purchasing department asked for!

Check back with us next week for a look at creating a web interface for your database applications!  

Next page > > Page 1, 2, 3

Previous Articles

Explore Databases

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Databases

  1. Home
  2. Computing & Technology
  3. Databases

©2009 About.com, a part of The New York Times Company.

All rights reserved.