1 <?xml version=
"1.0" encoding=
"UTF-8"?>
6 ***********************************************************************
8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
10 * Copyright 2008 by Sun Microsystems, Inc.
12 * OpenOffice.org - a multi-platform office productivity suite
14 * $RCSfile: 02000000.xhp,v $
17 * This file is part of OpenOffice.org.
19 * OpenOffice.org is free software: you can redistribute it and/or modify
20 * it under the terms of the GNU Lesser General Public License version 3
21 * only, as published by the Free Software Foundation.
23 * OpenOffice.org is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU Lesser General Public License version 3 for more details
27 * (a copy is included in the LICENSE file that accompanied this code).
29 * You should have received a copy of the GNU Lesser General Public License
30 * version 3 along with OpenOffice.org. If not, see
31 * <http://www.openoffice.org/license.html>
32 * for a copy of the LGPLv3 License.
34 ************************************************************************
38 <helpdocument version=
"1.0">
40 <topic id=
"textsharedexplorerdatabase02000000xml" indexer=
"include" status=
"PUBLISH">
41 <title id=
"tit" xml-lang=
"en-US">Queries
</title>
42 <filename>/text/shared/explorer/database/
02000000.xhp
</filename>
46 <section id=
"abfragen">
47 <bookmark xml-lang=
"en-US" branch=
"index" id=
"bm_id3150445"><bookmark_value>queries;overview (Base)
</bookmark_value>
48 <bookmark_value>tables in databases; printing queries (Base)
</bookmark_value>
49 <bookmark_value>printing; queries (Base)
</bookmark_value>
50 <bookmark_value>queries; printing (Base)
</bookmark_value>
51 </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>
52 <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>
54 <section id=
"howtoget">
55 <embed href=
"text/shared/00/00000450.xhp#Abfragen"/>
57 <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>
58 <paragraph role=
"heading" id=
"hd_id3153750" xml-lang=
"en-US" level=
"2" l10n=
"U" oldref=
"39">Printing Queries
</paragraph>
59 <paragraph role=
"paragraph" id=
"par_id3149183" xml-lang=
"en-US" l10n=
"U" oldref=
"40">To print a query or table:
</paragraph>
62 <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>
65 <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>
68 <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>
71 <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>
72 <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>
75 <paragraph role=
"listitem" id=
"par_id3150503" xml-lang=
"en-US" l10n=
"U" oldref=
"50">Print the document by choosing
<emph>File - Print
</emph>.
</paragraph>
78 <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>
79 <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>
80 <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>
81 <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>
82 <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>
83 <embed href=
"text/shared/main0214.xhp#sql"/>
84 <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>
85 <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>
86 <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>
87 <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>
88 <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>
89 <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>