Context English Chinese (Traditional)
02000000.xhp
tit
help.text
Queries
02000000.xhp
bm_id3150445
help.text
<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>
02000000.xhp
hd_id3150445
help.text
<link href="text/sdatabase/02000000.xhp" name="Queries">Queries</link>
02000000.xhp
par_id3150499
help.text
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.
02000000.xhp
par_id3147399
help.text
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".
02000000.xhp
hd_id3153750
help.text
Printing Queries
02000000.xhp
par_id3149183
help.text
To print a query or table:
02000000.xhp
par_id3156426
help.text
Open a text document (or a spreadsheet document if you prefer the specific printing functions of this type of document).
02000000.xhp
par_id3149827
help.text
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.
02000000.xhp
par_id3149398
help.text
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.
02000000.xhp
par_id3150443
help.text
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.
02000000.xhp
par_id3153561
help.text
The query or table will be inserted into your document.
02000000.xhp
par_id3150503
help.text
Print the document by choosing <emph>File - Print</emph>.
02000000.xhp
par_id3153146
help.text
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.
02000000.xhp
hd_id3148946
help.text
<link href="text/shared/main0212.xhp" name="Sorting and Filtering Data">Sorting and Filtering Data</link>
02000000.xhp
par_id3149655
help.text
Allows you to sort and filter the data in a query table.
02000000.xhp
hd_id3153379
help.text
<link href="text/sdatabase/02010100.xhp" name="Query Design">Query Design</link>
02000000.xhp
par_id3151211
help.text
With the <emph>Query Design</emph>, you can create and edit a query or view.
02000000.xhp
hd_id3153968
help.text
<link href="text/sdatabase/02010100.xhp" name="Query Through Several Tables">Query Through Several Tables</link>
02000000.xhp
par_id3151043
help.text
The query result can contain data from several tables if these are linked to each other by suitable data fields.