1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements.  See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership.  The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License.  You may obtain a copy of the License at
12 *
13 *   http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied.  See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 *
22 ***********************************************************-->
23
24<helpdocument version="1.0">
25<meta>
26<topic id="textsharedexplorerdatabase02000000xml" indexer="include" status="PUBLISH">
27<title id="tit" xml-lang="en-US">Queries</title>
28<filename>/text/shared/explorer/database/02000000.xhp</filename>
29</topic>
30</meta>
31<body>
32<section id="abfragen">
33<bookmark xml-lang="en-US" branch="index" id="bm_id3150445"><bookmark_value>queries;overview (Base)</bookmark_value>
34<bookmark_value>tables in databases; printing queries (Base)</bookmark_value>
35<bookmark_value>printing; queries (Base)</bookmark_value>
36<bookmark_value>queries; printing (Base)</bookmark_value>
37</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>
38<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>
39</section>
40<section id="howtoget">
41<embed href="text/shared/00/00000450.xhp#Abfragen"/>
42</section>
43<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>
44<paragraph role="heading" id="hd_id3153750" xml-lang="en-US" level="2" l10n="U" oldref="39">Printing Queries</paragraph>
45<paragraph role="paragraph" id="par_id3149183" xml-lang="en-US" l10n="U" oldref="40">To print a query or table:</paragraph>
46<list type="ordered">
47<listitem>
48<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>
49</listitem>
50<listitem>
51<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>
52</listitem>
53<listitem>
54<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>
55</listitem>
56<listitem>
57<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>
58<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>
59</listitem>
60<listitem>
61<paragraph role="listitem" id="par_id3150503" xml-lang="en-US" l10n="U" oldref="50">Print the document by choosing <emph>File - Print</emph>.</paragraph>
62</listitem>
63</list>
64<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>
65<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>
66<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>
67<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>
68<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>
69<embed href="text/shared/main0214.xhp#sql"/>
70<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>
71<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>
72<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>
73<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>
74<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>
75<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>
76</body>
77</helpdocument>
78