1<?xml version="1.0" encoding="UTF-8"?> 2 3 4 5<!--*********************************************************** 6 * 7 * Licensed to the Apache Software Foundation (ASF) under one 8 * or more contributor license agreements. See the NOTICE file 9 * distributed with this work for additional information 10 * regarding copyright ownership. The ASF licenses this file 11 * to you under the Apache License, Version 2.0 (the 12 * "License"); you may not use this file except in compliance 13 * with the License. You may obtain a copy of the License at 14 * 15 * http://www.apache.org/licenses/LICENSE-2.0 16 * 17 * Unless required by applicable law or agreed to in writing, 18 * software distributed under the License is distributed on an 19 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 20 * KIND, either express or implied. See the License for the 21 * specific language governing permissions and limitations 22 * under the License. 23 * 24 ***********************************************************--> 25 26 27 28 29 <helpdocument version="1.0"> 30<meta> 31<topic id="textsharedexplorerdatabase02000000xml" indexer="include" status="PUBLISH"> 32<title id="tit" xml-lang="en-US">Queries</title> 33<filename>/text/shared/explorer/database/02000000.xhp</filename> 34</topic> 35</meta> 36<body> 37<section id="abfragen"> 38<bookmark xml-lang="en-US" branch="index" id="bm_id3150445"><bookmark_value>queries;overview (Base)</bookmark_value> 39<bookmark_value>tables in databases; printing queries (Base)</bookmark_value> 40<bookmark_value>printing; queries (Base)</bookmark_value> 41<bookmark_value>queries; printing (Base)</bookmark_value> 42</bookmark><comment>mw added "(Base)" to all entries </comment><paragraph role="heading" id="hd_id3150445" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/shared/explorer/database/02000000.xhp" name="Queries">Queries</link></paragraph> 43<paragraph role="paragraph" id="par_id3150499" xml-lang="en-US" l10n="CHG" oldref="2">A "query" is a special view of a table. A query can display chosen records or chosen fields within records; it can also sort those records. A query can apply to one table to multiple tables, if they are linked by common data fields.<comment>i73680</comment></paragraph> 44</section> 45<section id="howtoget"> 46 <embed href="text/shared/00/00000450.xhp#Abfragen"/> 47</section> 48<paragraph role="paragraph" id="par_id3147399" xml-lang="en-US" l10n="U" oldref="12">Use queries to find records from data tables based on certain criteria. All queries created for a database are listed under the <emph>Queries</emph> entry. Since this entry contains the database queries, it is also called the "query container".</paragraph> 49<paragraph role="heading" id="hd_id3153750" xml-lang="en-US" level="2" l10n="U" oldref="39">Printing Queries</paragraph> 50<paragraph role="paragraph" id="par_id3149183" xml-lang="en-US" l10n="U" oldref="40">To print a query or table:</paragraph> 51<list type="ordered"> 52<listitem> 53<paragraph role="listitem" id="par_id3156426" xml-lang="en-US" l10n="U" oldref="41">Open a text document (or a spreadsheet document if you prefer the specific printing functions of this type of document).</paragraph> 54</listitem> 55<listitem> 56<paragraph role="listitem" id="par_id3149827" xml-lang="en-US" l10n="CHG" oldref="42">Open the database file and click the Table icon if you want to print a table, or click the Query icon if you want to print a query.</paragraph> 57</listitem> 58<listitem> 59<paragraph role="listitem" id="par_id3149398" xml-lang="en-US" l10n="CHG" oldref="43">Drag the name of the table or query into the open text document or spreadsheet. The dialog <link href="text/shared/02/12070000.xhp" name="Insert Database Columns">Insert Database Columns</link> opens.</paragraph> 60</listitem> 61<listitem> 62<paragraph role="listitem" id="par_id3150443" xml-lang="en-US" l10n="U" oldref="44">Decide which columns = data fields you want to include. You can also click the <emph>AutoFormat</emph> button and select a corresponding formatting type. Close the dialog.</paragraph> 63<paragraph role="listitem" id="par_id3153561" xml-lang="en-US" l10n="U" oldref="49">The query or table will be inserted into your document.</paragraph> 64</listitem> 65<listitem> 66<paragraph role="listitem" id="par_id3150503" xml-lang="en-US" l10n="U" oldref="50">Print the document by choosing <emph>File - Print</emph>.</paragraph> 67</listitem> 68</list> 69<paragraph role="tip" id="par_id3153146" xml-lang="en-US" l10n="CHG" oldref="47">You can also open the data source view (F4), select the entire database table in the data source view (button in the top left corner of the table), and then drag the selection to a text document or spreadsheet.</paragraph> 70<paragraph role="heading" id="hd_id3148946" xml-lang="en-US" level="2" l10n="U" oldref="46"><link href="text/shared/main0212.xhp" name="Sorting and Filtering Data">Sorting and Filtering Data</link></paragraph> 71<paragraph role="paragraph" id="par_id3149655" xml-lang="en-US" l10n="U" oldref="28">Allows you to sort and filter the data in a query table.</paragraph> 72<paragraph role="heading" id="hd_id3153379" xml-lang="en-US" level="2" l10n="U" oldref="14"><link href="text/shared/explorer/database/02010100.xhp" name="Query Design">Query Design</link></paragraph> 73<paragraph role="paragraph" id="par_id3151211" xml-lang="en-US" l10n="U" oldref="18">With the <emph>Query Design</emph>, you can create and edit a query or view.</paragraph> 74<embed href="text/shared/main0214.xhp#sql"/> 75<paragraph role="heading" id="hd_id3153968" xml-lang="en-US" level="2" l10n="U" oldref="29"><link href="text/shared/explorer/database/02010100.xhp" name="Query Through Several Tables">Query Through Several Tables</link></paragraph> 76<paragraph role="paragraph" id="par_id3151043" xml-lang="en-US" l10n="U" oldref="30">The query result can contain data from several tables if these are linked to each other by suitable data fields.</paragraph> 77<paragraph role="heading" id="hd_id3159149" xml-lang="en-US" level="2" l10n="U" oldref="31"><link href="text/shared/explorer/database/02010100.xhp" name="Formulating Query Criteria">Formulating Query Criteria</link></paragraph> 78<paragraph role="paragraph" id="par_id3154910" xml-lang="en-US" l10n="U" oldref="32">You can find out which operators and commands can be used to formulate the filter conditions for a query.</paragraph> 79<paragraph role="heading" id="hd_id3156212" xml-lang="en-US" level="2" l10n="U" oldref="33"><link href="text/shared/explorer/database/02010100.xhp" name="Executing Functions">Executing Functions</link></paragraph> 80<paragraph role="paragraph" id="par_id3144762" xml-lang="en-US" l10n="U" oldref="34">You can perform calculations with the data of a table and store the results as a query result.</paragraph> 81</body> 82</helpdocument> 83