A contribution by Axel Drefahl, axeleratio.com, September 22, 2016.
This post continues my preceding OpenOffice™ Base (ooBase) lessons:
Running a query results in a table. Before running it, we need to create it. In the following example we use the ooBase Design View tool to create a query that selects all minerals from CesbronList that contain yttrium (Y):
You can come back to your query at any time to reset the query critera and to include not-yet-selected fields into your query. In the next lesson we are going to extend QueryByRee such that we are enabled to filter minerals by any desired combination of rare-earth elements.
This post continues my preceding OpenOffice™ Base (ooBase) lessons:
- Exploring OpenOffice™ Base: an example involving rare-earth mineral data
- Structuring rare-earth mineral data in an OpenOffice™ Base table
- Modifying the column layout of an existing OpenOffice™ Base table
- Defining and creating relationships between OpenOffice™ Base tables
Running a query results in a table. Before running it, we need to create it. In the following example we use the ooBase Design View tool to create a query that selects all minerals from CesbronList that contain yttrium (Y):
- Open RareEarthMinerals_2tables.odb. If not yet done, create the relationship as shown in the previous lesson.
- Click Queries in the Database pane.
- In the Tasks pane, select Create Query in Design View... to open the Query Design window with the pop-up Add Table or Query dialog.
- Add CesbronList and Close the Add Table or Query dialog.
- From the appearing CesbronList field list, drag the names of those fields you want to include in your query into the cells of the Field row of the table in the lower section of the Query Design window: drag ID, MinName, MinFormula and hasY into the first, second, third and fourth Field cell, respectively. Notice that the first four Table cells indicate the source table, CesbronList, and the first four Visible cells include the Yes check mark.
- To select all minerals with hasY set to Yes, click into the hasY cell of the Criterion row and enter TRUE.
- Click the Run Query Icon (or press F5 key). A table (view) with 74 records representing exactly those minerals that contain yttrium appears between the menu bar and the query design table.
- Open the Save As dialog by selecting File > Save from the menu in the Query Design window and enter QueryByREE as Query name, then press the OK button. Close the Query Design window.
- In the Queries pane, double-click QueryByREE to open and review the Table Data View window with the mineral data for the Y-containing minerals.
Query Design window after running the query by pressing the Run Query Icon (fourth icon from right in the upper menu bar in the above cut-out section |
You can come back to your query at any time to reset the query critera and to include not-yet-selected fields into your query. In the next lesson we are going to extend QueryByRee such that we are enabled to filter minerals by any desired combination of rare-earth elements.
No comments:
Post a Comment