summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sdatabase/02000000.xhp
blob: 03917dfce39f127d0b606517fafec7c597431ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->
<helpdocument version="1.0">
<meta>
<topic id="textsharedexplorerdatabase02000000xml" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">Queries</title>
<filename>/text/sdatabase/02000000.xhp</filename>
</topic>
</meta>
<body>
<section id="queries">
<bookmark xml-lang="en-US" branch="index" id="bm_id3150445"><bookmark_value>queries;overview (Base)</bookmark_value>
<bookmark_value>tables in databases; printing queries (Base)</bookmark_value>
<bookmark_value>printing; queries (Base)</bookmark_value>
<bookmark_value>queries; printing (Base)</bookmark_value>
</bookmark><comment>mw added "(Base)" to all entries </comment><h1 id="hd_id3150445"><link href="text/sdatabase/02000000.xhp" name="Queries">Queries</link></h1>
<paragraph role="paragraph" id="par_id3150499" xml-lang="en-US">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 or to multiple tables, if they are linked by common data fields.<comment>i73680</comment></paragraph>
</section>
<section id="howtoget">
  <embed href="text/shared/00/00000450.xhp#Abfragen"/>
</section>
<paragraph role="paragraph" id="par_id3147399" xml-lang="en-US">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>
<h2 id="hd_id3153750">Printing Queries</h2>
<paragraph role="paragraph" id="par_id3149183" xml-lang="en-US">To print a query or table:</paragraph>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3156426" xml-lang="en-US">Open a text document (or a spreadsheet document if you prefer the specific printing functions of this type of document).</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3149827" xml-lang="en-US">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>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3149398" xml-lang="en-US">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>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3150443" xml-lang="en-US">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>
<paragraph role="listitem" id="par_id3153561" xml-lang="en-US">The query or table will be inserted into your document.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3150503" xml-lang="en-US">Print the document by choosing <emph>File - Print</emph>.</paragraph>
</listitem>
</list>
<tip id="par_id3153146">You can also open the data source view (Ctrl+Shift+F4), select the entire database table in the data source view (click on the top left corner of the table), and then drag the selection to a text document or spreadsheet.</tip>
<h2 id="hd_id3148946"><link href="text/shared/main0212.xhp" name="Sorting and Filtering Data">Sorting and Filtering Data</link></h2>
<paragraph role="paragraph" id="par_id3149655" xml-lang="en-US">Allows you to sort and filter the data in a query table.</paragraph>
<h2 id="hd_id3153379"><link href="text/sdatabase/02010100.xhp" name="Query Design">Query Design</link></h2>
<paragraph role="paragraph" id="par_id3151211" xml-lang="en-US">With the <emph>Query Design</emph>, you can create and edit a query or view.</paragraph>
<embed href="text/shared/main0214.xhp#sql"/>
<h2 id="hd_id3153968"><link href="text/sdatabase/02010100.xhp" name="Query Through Several Tables">Query Through Several Tables</link></h2>
<paragraph role="paragraph" id="par_id3151043" xml-lang="en-US">The query result can contain data from several tables if these are linked to each other by suitable data fields.</paragraph>
<h2 id="hd_id3159149"><link href="text/sdatabase/02010100.xhp" name="Formulating Query Criteria">Formulating Query Criteria</link></h2>
<paragraph role="paragraph" id="par_id3154910" xml-lang="en-US">You can find out which operators and commands can be used to formulate the filter conditions for a query.</paragraph>
<h2 id="hd_id3156212"><link href="text/sdatabase/02010100.xhp" name="Executing Functions">Executing Functions</link></h2>
<paragraph role="paragraph" id="par_id3144762" xml-lang="en-US">You can perform calculations with the data of a table and store the results as a query result.</paragraph>
</body>
</helpdocument>