Professional Documents
Culture Documents
Lesson Plan: Suitability: ADP (F) Subject: Handling of Quiries
Lesson Plan: Suitability: ADP (F) Subject: Handling of Quiries
Lesson Plan: Suitability: ADP (F) Subject: Handling of Quiries
SUITABILITY
ADP(F)
SUBJECT
HANDLING OF
QUIRIES
DURATION
80 MIN
TRG AIDS
SLIDE POWERPOINT
PREPARED/
CHECKED BY
DATE
REVISION
1.
2.
Queries are an essential part of any database. Query is a tool to
extract the desired info. For retrieving the desired information from a
database, queries specify a series of conditions. And, the information
satisfying these conditions gets stored out from the database. Database is a
combination of tables, Queries, Forms and Reports. So, queries are medium
to access selective info in tables or forms. When Microsoft Access executes a
query on a table, it displays only those records which match the specified
condition set in the query.
AIM
3.
4.
(b)
Ph 2. Handling of queries
CREATING A QUERY ON A TABLE
5.
Let us now create a query in the Address database. This query gives
info about the codes (C-ID) and name of the customer (First Name) along with
the name (Product Name), cost (Price) and quantity of products(Quantity)
purchased by them. For this, we will proceed along the following steps.
(a)
(b)
Then click the New button of the address. In the New query box,
the design view is highlighted by default
(c)
Then click on the OK button (The Show Table box displays the
name of the tables).
(d)
(e)
(f)
(g)
After selecting the reqd tables, click on the Close button
(Now a query box gets displayed on the screen).
(h)
Inside the two small boxes, select only those fds which you
wish to include in query. These are :(i)
The first fd to be selected is the customer iden No fd (C
_ID) . This fd is present in the address details table.
(ii)
The next fd to be selected is the name of the customer,
i.e FIRST NAME. This fd is also present the small box
containing the fds of address details.
(iii)
(iv)
Similarly you can select of the fds (PRODUCT NAME,
PRICE and QUANTITY) from the small box containing the fds of
Order details table.
(j)
Now let us a perform a query on all the fds selected for your
query. To do so, move the mouse pointer over the Run button and click
left mouse button.
6.
7.
Ph conformation.
8.
Ph Summary.
HANDLING OF QUERIES
9.
Sorting Records According to a File.
proceed the following steps.
(a)
Mov the mouse pointer over the down arrow button and
click the left mouse button.
(b)
Inside the pull down menu, click the Design view option
(Immediately the query will changes to Design view).
(c)
Now click the left mouse button besides the sort option.
(d)
Click on the down arrow button.(Instantly a pull-down menu
appears)
(e)
(f)
Now click on the Run button (This time immediately, the names
under the fd FIRST NAME appears in the ascending order).
10.
Removing Sort from a Fd. To removing sort from a fd, you may
undertake the following steps :(a) Mov the mouse pointer over the down arrow button and
click the left mouse button.
(b)
Inside the pull down menu, click the Design view option
(Immediately the query will changes to Design view).
(c)
Now remove the sorting of the fd FIRST NAME, mov the mouse
pointer on the down arrow button(Beside the ascending option)
(d)
Then click the left mouse button, Immediately a pull-down menu
appears. In the pull-down menu, move the mouse pointer over the
(Not sorted) option and then click the left mouse button.
(e)
Finally click on the run button.(Now all the records of the fds
appear in the previous order)
11.
Hiding a Fd. For hiding a fd you may undertake the following steps :(a)
Move the mouse pointer over the down arrow button of the view
button.
(b)
Inside the pull-down menu click on Design View option. (The
query gets changed to Design View).
(c)
At the bottom of the query 1, select query box, you will notice a
Tick mark displayed under each fd at the show option.
(d)
Then click the left mouse button on the Tick mark. The Tick
mark disappears instantly.
(e)
Now execute the query move the mouse pointer over the Run
button of the tool bar and click on it.
12.
Unhiding a Fd.
steps :-
(a)
Move the mouse pointer over the down arrow button of the view
button.
(b)
Then mov the mouse pointer inside the blank squire beside the
Show option of the fd and click inside it. A Tick mark re-appears inside
the box.
(c)
13.
Setting Criterion.
Criteria are conditions you set to display the
specific records. For a setting a criterion, first display the query in the design
view. To do so, you may undertake the following steps :(a)
Move the mouse pointer over the down arrow button of the view
button.
(b)
(c)
Now mov the mouse pointer towards the right and click just
below the fd PRODUCT NAME. Immediately a blinking cursor
appears at that location.
(d)
(e)
14.
Deleting Criterion.
following steps :-
(a)
Mov the mouse pointer to the left of the text written at Criteria
option. (= pencil box and click the left mouse button).
(b)
Then press the left mouse button, and keeping it pressed, drag it
such that the = pencil box criterion gets highlighted.
(c)
Once the entire criterion text has been highlighted, release the
mouse button.
(d)
(e)
15.
Performing Calculations.
undertake the following steps :-
To
performing
calculations
you
may
(a)
Mov the mouse pointer to the new column next to the fd
name QUANTITY and click the left mouse button.
(b)
In the view fd, you have to type its name, say TOTAL PRICE.
(c)
Just next to the line TOTAL PRICE, you have to type a comd.
So type : (coln)
(d)
(e)
(f)
15.
Saving Query.
steps :-
(a)
Mov the mouse pointer on the save button of the toolbar
and click the left mouse button ( A save as box appears on the screen).
(b)
Now type in a name, say Product Query, for this query and then
click on the OK button(Your query gets saved with the name Product
Query).
16.
Closing the Query and Quitting Access. To closing the query and
quitting access you may undertake the following steps :(a)
Click on the File menu bar option. Then a pull-down menu gets
displayed.
(b)
Inside the pull-down menu, click over the Close option. Your
query closes and you return to the Address : Database box.
(b)
Again click on File menu bar option to close the Address :
Database box.
(c)
(d)
18.
Ph conformation.
(a)
Question 3.
(b)
Answer 3.
19.
Ph Summary.
20.
7
21