Page 113 - Viva ICSE Computer Studies 7 : E-book
P. 113

Query Window

                                                                         A query window is divided into two panes.
                                                                         The upper pane that displays the tables is
                                                                         selected for the query.  The bottom pane
                                                                         displays a design grid where fi elds can be
                                                                         added to a query and a criteria can also be
                                                                         mentioned.

                    Let’s understand the design grid.

                    Field: It displays the selected fi eld names from the table.
                    Table: It is displayed under each fi eld name. It displays the name of the table from which that
                    fi eld exists.

                    Sort: It is used to sort the data either in an ascending or descending order.

                    Show: It displays the checkbox, indicating the fi eld that will be visible after the execution of a
                    query.

                    Criteria: It specifi es the condition on which the records are to be fi ltered.
                    Or: It is used to specify multiple criteria in a query.


                    Using a Query

                    Let’s create a query on the ‘Result’ table: To display the Roll no whose marks are > 70.

                    Follow these steps to use a query.

                      1.  Select the table on which the query will be generated. Here we are selecting the ‘Result’
                           table.                                   Step 5
                      2.  Select the required fi eld from the
                           drop-down list of the ‘Field’ row in
                           the ‘Design Grid’.

                      3.  Select the order of sorting in the
                           ‘Sort’ row.
                                                                          Step 1              Step 2
                      4.  Mention the criteria in the ‘Criteria’
                           row, i.e.,  ‘>70’ under the marks          Step 3
                           column.
                                                                                      Step 4
                      5.  Click on the Run button from the
                           ‘Results’ group of the ‘Design’ tab.





                                                              6.  The result of the query is displayed, showing only
                                                  Step 6
                                                                   those records that meet the criteria.




                                                                                                                    101
   108   109   110   111   112   113   114   115   116   117   118