Database query, Convert all table words to lowercase, Form a...

Database query

Queries allow you to select from the tables only those data that are of interest to the user. In our case, it is not difficult to scan any database table and find the necessary data in it. However, if we have a table with thousands and hundreds of thousands of entries, for example, DB "United States Dictionary", finding the right word can take a long time.

The wording of the query allows for a complex search and processing of information, which is provided by special options Access and is described in detail in the relevant reference literature. We will dwell on a few examples.

Any query is constructed using the Query Designer.

To call the Query Designer, click the Create button and then the Query Designer at the top of the main Access window. A new Query Builder window (context menu) you can create your request. But first you open the Add Table dialog box, in which you can select the tables that contain the data you need to formulate the query (table WORDS). Then click the Add button, then click Close. In the table at the bottom of the screen, select the fields that the user wants to include in his query.

When working with the database Access , you may need to generate a query to select all words starting with a specific letter or sequence of letters. To create such a query type, enter the sequence Like in * in the Selection condition line. Such a record means that when the query is executed, all entries in the WORDS table starting with the letter in will be selected. Then it will be enough to click the Run button at the top of the screen to display a table of all the words in the word table starting with the letter in & quot ;.

Convert all table words to lower case

To solve the task, namely, the creation of a frequency dictionary of parts of speech in the fairy tale "The Rooster and the Millstones", it is necessary to change the register of words prepared in the previous stage of the table. The result of the conversion must be written to the new field of the WORDS table. To implement this operation, open the WORK table and add the name of the new field (NSL) at the top line of the table, then go to the Query Builder. On the Add Table tab, select the WORK table and close the tab. In the field of the left column field, click the arrow and select the field to be processed or selected (in our case, the WORD field).

In the row of the next column field, select the field in which the result of converting words to lowercase (N_WORD) will be stored and assign the sequence: LCase ([WORD]). As a result of these actions, N_CLOSE will be received: LCase ([C/IOBO]). The LCase function converts all letters to lowercase letters, and the argument of the [WORD] function determines that the given operation is applied to all elements of the WORD field of the WORD table. At the next step, click the Run button at the top of the screen.

As a result, we get a table with the field H_CLEAR, which contains all the words from the WORD field in the lower case.

Form a list with unique values ​​and frequencies of their occurrence in the table

Open the form of the new query, then in the Group operation row, select the Grouping command. In the next column, fill in: Field - WORD value, Group operation - Count value, Sort - By Descending value (Figure 14.2). Click the Run button at the top of the screen. A table of unique wordforms of a fairy tale will appear on the screen in one column and the frequencies of occurrence of each word form in the next column.

Request for a table of unique word forms of the fairy tale and frequency of occurrence of each word form

Fig. 14.2. Request a table of unique wordforms of the fairy tale and frequency of occurrence of each wordform

Also We Can Offer!

Other services that we offer

If you don’t see the necessary subject, paper type, or topic in our list of available services and examples, don’t worry! We have a number of other academic disciplines to suit the needs of anyone who visits this website looking for help.

How to ...

We made your life easier with putting together a big number of articles and guidelines on how to plan and write different types of assignments (Essay, Research Paper, Dissertation etc)