eHow launches Android app: Get the best of eHow on the go.

How To

How to Determine Which Query to Use in Microsoft Access

Contributor
By eHow Contributing Writer
(5 Ratings)

You can select from five query types in Microsoft Access: select query, SQL query, crosstab query, parameter query or action query. These instructions apply to Access 97.

Difficulty: Moderately challenging
Instructions

Things You'll Need:

  1. Step 1

    Understand that a select query retrieves data and values from one or more tables. The results are displayed in a datasheet. For example, if you have one table for your CD collection and another table for your favorite performing artists, you could run a query that would display all CDs by your favorite artist.

  2. Step 2

    Realize that a parameter query prompts you for information when the query is run. For example, if you want a query that would show you how many sales you had generated in any given month, you could design a parameter query that would prompt you to supply the month that you wanted the query to cover.

  3. Step 3

    Know that a crosstab query calculates a sum, count or other data, then displays the information horizontally as well as vertically. Crosstab queries display the same type of information as a select query, but the display is easier to view.

  4. Step 4

    Realize that action queries make changes to many records all in one operation. Action queries can append, delete or update records, or make a new table of selected records. For example, with a delete action, you would run a query to delete the records for everyone in your address book that you had not contacted in a certain period of time.

  5. Step 5

    Understand that you create a SQL query using a SQL statement (such as Select, Delete, Where, Order By). SQL is a standard scripting language used to make requests from databases. Four examples of SQL queries are union, pass-through, data-definition and subquery. For example, a pass-through query sends requests to a Microsoft SQL server, such as may be found in a network (Internet, intranet, wide area network and so on). SQL queries can be complex; if you can't do what you want with other query types, you might be able to in SQL. To use SQL most effectively, consider buying a book on the subject.

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Computers
Alexia Petrakos,

Meet Alexia Petrakos eHow's Computers Expert.

Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics