MS Access 2003 Step By Step - Asim Abbasi
CH1: Overview | CH2: MS Access Local & Linked Tables | CH3: MS Access Queries | CH4: MS Access Reports & Forms | CH5: MS Access Modules & Macros | CH6: MS Access Data Import/Export Feature | CH7: MS Access Built-In Functions
Chapter 3: MS Access Queries
Select Query:
We use Select Query to extract data from table or tables linked together
via Joins as discussed before. Like its mentioned before while
developing any of the queries, MS Access treats all the tables as if
they are MS Access tables. There is no discrimination between Local and
Linked tables when you are designing any type of queries.
The time you run the query, the resultant data will be displayed. The
displayed data will only be in the RAM or in other words the time you
close the Run View of the query, the data will get vanished. To extract
the data again, you have to run the query again. For query that takes a
long time to execute, we usually prefer to have a Make-Table query
rather than a Select query under many scenarios. We will discuss about
the Make-Table Query in the next article.
Make-Table Query:
Make-Table query is designed exactly the same manner we design the
Select query. The only difference is the Run view. In the Run View of a
Make-Table query the resultant data will be saved in the form of MS
Access Local Table.
If your Make-Table Query is comprised of Local as well as Oracle Linked
tables, once you run it, all the data will get transferred from Oracle
to MS Access in the form of local table. We will learn in detail in step
by step manner, how to design and deal with Make-Table Queries.
Update Query:
As the name states the Update query is used to update already existing
records in the tables. No matter the tables are MS Access Local tables
or MS Access Linked Tables (Oracle tables visible via ODBC in MS
Access), update operation will get performed upon execution of such
query.
We used many times Update Queries to perform bulk updates on Oracle
tables based on some logic. The process that used to take months to
attain the across the board salary increase now can be done within
minutes without even writing any SQL code. That’s the power of MS
Access.
Append Query:
Append queries are used to add new records in the table at the end.
Whenever you would like to append new records or in other words whenever
you would like to insert new records at the end of the table use the
append query. This query can be performed on MS Access local as well as
linked tables.
Delete Query:
The purpose of the delete query is to delete any number of records from
table, no matter whether its local or linked table. Records are usually
deleted based on some logic or criteria. Note that you should be very
careful in running such types of queries as if you don’t mention any
criteria; you may end up loosing all the records in your table.
Now we will be looking at each of these queries one by one starting with
Select query in great detail in terms of design and everything.
Chapter 3: MS Access Queries
CH1: Overview | CH2: MS Access Local & Linked Tables | CH3: MS Access Queries | CH4: MS Access Reports & Forms | CH5: MS Access Modules & Macros | CH6: MS Access Data Import/Export Feature | CH7: MS Access Built-In Functions
Share with others: