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