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