<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=LibreOffice-Suite-Base%2FC2%2FCreate-queries-using-Design-View%2FEnglish</id>
		<title>LibreOffice-Suite-Base/C2/Create-queries-using-Design-View/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=LibreOffice-Suite-Base%2FC2%2FCreate-queries-using-Design-View%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=LibreOffice-Suite-Base/C2/Create-queries-using-Design-View/English&amp;action=history"/>
		<updated>2026-05-13T23:49:46Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=LibreOffice-Suite-Base/C2/Create-queries-using-Design-View/English&amp;diff=320&amp;oldid=prev</id>
		<title>Chandrika: Created page with '{| border=1 !Visual Cue !Narration |- |Show Slide Number 1  Spoken tutorial on LibreOffice Base: Create Queries in Design View Learning Objectives * Create a query by using the D…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=LibreOffice-Suite-Base/C2/Create-queries-using-Design-View/English&amp;diff=320&amp;oldid=prev"/>
				<updated>2012-11-27T14:51:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;{| border=1 !Visual Cue !Narration |- |Show Slide Number 1  Spoken tutorial on LibreOffice Base: Create Queries in Design View Learning Objectives * Create a query by using the D…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=1&lt;br /&gt;
!Visual Cue&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
|Show Slide Number 1 &lt;br /&gt;
Spoken tutorial on LibreOffice Base: Create Queries in Design View&lt;br /&gt;
Learning Objectives&lt;br /&gt;
* Create a query by using the Design View&lt;br /&gt;
* Add tables to the Query Design window&lt;br /&gt;
* Select fields &lt;br /&gt;
* Set up aliases, &lt;br /&gt;
* Set up sorting order&lt;br /&gt;
* Provide search criteria&lt;br /&gt;
|Welcome to the Spoken tutorial on LibreOffice Base.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will learn how to&lt;br /&gt;
&lt;br /&gt;
Create a query by using the Design View.	&lt;br /&gt;
&lt;br /&gt;
Add tables to the Query Design window&lt;br /&gt;
&lt;br /&gt;
Select fields.&lt;br /&gt;
&lt;br /&gt;
Set up aliases, &lt;br /&gt;
&lt;br /&gt;
Set up sorting order&lt;br /&gt;
&lt;br /&gt;
And provide search criteria for a query&lt;br /&gt;
|-&lt;br /&gt;
|Show Slide Number 2&lt;br /&gt;
&lt;br /&gt;
Creating a query by using the Design View&lt;br /&gt;
&lt;br /&gt;
Example: Generate a history of books that have been issued to the members.&lt;br /&gt;
|For this, let us consider our familiar Library database example. &lt;br /&gt;
&lt;br /&gt;
In this Library database, we have stored information about books and members. &lt;br /&gt;
&lt;br /&gt;
And, we also have a table to track the books issued to the members.&lt;br /&gt;
&lt;br /&gt;
Now we will create a new query, to list all the books that have been issued to the members, &lt;br /&gt;
&lt;br /&gt;
In other words, let us generate a history of books that have been issued to the members.&lt;br /&gt;
|-&lt;br /&gt;
|In the Base main window,&lt;br /&gt;
&lt;br /&gt;
Click on 'Queries' on the left panel, &lt;br /&gt;
click on 'Create Query in Design view'&lt;br /&gt;
Show appropriate cursor movement&lt;br /&gt;
&lt;br /&gt;
Point mouse over table names as narration goes forward&lt;br /&gt;
&lt;br /&gt;
Click on the Books table in the list and then click on the Add button on the right in the popup window.&lt;br /&gt;
&lt;br /&gt;
Click on the BooksIssued table in the list and then click on the Add button.&lt;br /&gt;
Click on the Members table in the list and then click on the Add button.&lt;br /&gt;
Point mouse over the the three added tables in the background window&lt;br /&gt;
Click close button in the popup.&lt;br /&gt;
|Lets open the Library database. &lt;br /&gt;
&lt;br /&gt;
Let us click on the Queries icon on the left panel. &lt;br /&gt;
&lt;br /&gt;
On the right panel, we will click on the ‘Create Query in Design view’. &lt;br /&gt;
We now see a new window which is also called the Query Design window, &lt;br /&gt;
&lt;br /&gt;
And we can also see a small popup window at the top, that says Add Table or Query.&lt;br /&gt;
&lt;br /&gt;
Here is where we will define the source of the data for the query. &lt;br /&gt;
&lt;br /&gt;
And we will need all the three tables for our query to generate the history of books issued to members.&lt;br /&gt;
&lt;br /&gt;
We will do this by clicking on the Books table in the list and then clicking on the Add button on the right in the popup window.&lt;br /&gt;
&lt;br /&gt;
We will similarly add the BooksIssued table and the Members table &amp;lt;pause&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now see that, the three tables have appeared in the background query design window.&lt;br /&gt;
&lt;br /&gt;
Let us now ‘Close the popup window. &lt;br /&gt;
&lt;br /&gt;
This brings the Query design window to the foreground.&lt;br /&gt;
|-&lt;br /&gt;
|Click, drag and drop the Members table to the far right. Then click, drag and drop the BooksIssued table to the centre.&lt;br /&gt;
&lt;br /&gt;
Double click on the line between Books and BooksIssued table. &lt;br /&gt;
&lt;br /&gt;
Close the new popup window.&lt;br /&gt;
|Notice that the three tables are in the top half of the window. &lt;br /&gt;
&lt;br /&gt;
Here let us introduce some space among these tables. &lt;br /&gt;
&lt;br /&gt;
Let us click, drag and drop the Members table to the far right. &lt;br /&gt;
&lt;br /&gt;
And then, click, drag and drop the BooksIssued table to the centre. &lt;br /&gt;
&lt;br /&gt;
Now we see lines linking these tables and these are the relationships that we had established earlier. &lt;br /&gt;
&lt;br /&gt;
We can double-click on the lines to see the relationship details.&lt;br /&gt;
|-&lt;br /&gt;
|Point mouse over lower half of window. &lt;br /&gt;
&lt;br /&gt;
Now, point mouse over the field names are they are narrated.&lt;br /&gt;
&lt;br /&gt;
Double click on the Title field in the Books table on the upper half of the window&lt;br /&gt;
Double click on the following fields one by one:&lt;br /&gt;
Name field in members table&lt;br /&gt;
IssueDate in BooksIssued&lt;br /&gt;
&lt;br /&gt;
ReturnDate&lt;br /&gt;
&lt;br /&gt;
ActualReturnDate and&lt;br /&gt;
&lt;br /&gt;
CheckedIn fields&lt;br /&gt;
&lt;br /&gt;
Point mouse over the first row&lt;br /&gt;
&lt;br /&gt;
Point mouse over the third row&lt;br /&gt;
|For now, let us see the bottom half of the Query design window.&lt;br /&gt;
&lt;br /&gt;
This area has several rows of cells. &lt;br /&gt;
As we design the query, we will fill these up. &lt;br /&gt;
&lt;br /&gt;
First, we will check the Field column. &lt;br /&gt;
&lt;br /&gt;
This is for specifying the fields we need to display in the result set. &lt;br /&gt;
&lt;br /&gt;
To do this, we will first double click on the Title field in the Books table in the upper half of the window.&lt;br /&gt;
&lt;br /&gt;
Next is the Name field in the Members table. &lt;br /&gt;
&lt;br /&gt;
And then the Issue Date field in the BooksIssued table. &lt;br /&gt;
&lt;br /&gt;
Next, the Return date, &lt;br /&gt;
&lt;br /&gt;
the actual return date &lt;br /&gt;
&lt;br /&gt;
And finally the checked in field.&lt;br /&gt;
&lt;br /&gt;
Notice these fields in the bottom half of the window in the first row. &lt;br /&gt;
&lt;br /&gt;
And also the corresponding table names in the third row.&lt;br /&gt;
|-&lt;br /&gt;
|Point mouse at the Alias row.&lt;br /&gt;
&lt;br /&gt;
Type in the following in the Alias row:&lt;br /&gt;
Book Title under the title field&lt;br /&gt;
Member Name under the name field&lt;br /&gt;
Book Issue Date under the IssueDate field&lt;br /&gt;
Return Date under the ReturnDate field&lt;br /&gt;
Actual Return Date under the ActualReturnDate&lt;br /&gt;
And, Checked In Status under the CheckedIn field.&lt;br /&gt;
|Next, let us look at the ‘Alias’ in the second row.&lt;br /&gt;
&lt;br /&gt;
This is where we can enter descriptive names for the selected fields. &lt;br /&gt;
&lt;br /&gt;
So let us type in aliases as shown in the image.&amp;lt;pause&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And we are done with the aliases.&lt;br /&gt;
|-&lt;br /&gt;
|Point mouse over the Sort in the fourth row&lt;br /&gt;
&lt;br /&gt;
Click on the empty cell in the Sort row, under the Issuedate field. &lt;br /&gt;
&lt;br /&gt;
In the dropdown box, click on ‘Ascending’.&lt;br /&gt;
|Next, let us look at the Sort row. &lt;br /&gt;
&lt;br /&gt;
We can specify the ordering of the result set here. &lt;br /&gt;
&lt;br /&gt;
Since we need a history of the books issued, we will order it chronologically. &lt;br /&gt;
&lt;br /&gt;
Meaning we will sort the result set by the Issue Date in ascending order. &lt;br /&gt;
&lt;br /&gt;
For this, we will click on the empty cell in the Sort row, under the Issuedate field. &lt;br /&gt;
&lt;br /&gt;
And let us click on ‘Ascending’.&lt;br /&gt;
|-&lt;br /&gt;
|Point mouse over the ‘Visible’ in the fifth row&lt;br /&gt;
|Okay, we will go to the next row - ‘Visible’. &lt;br /&gt;
&lt;br /&gt;
Here we can set the visibility of the fields we selected by checking or un-checking them. &lt;br /&gt;
&lt;br /&gt;
Notice that, by default, all of them are checked.&lt;br /&gt;
|-&lt;br /&gt;
|Point mouse over the ‘Function’ in the sixth row.&lt;br /&gt;
|Next, we will go to the ‘Function’ row. &lt;br /&gt;
&lt;br /&gt;
This is used to create complex queries. &lt;br /&gt;
&lt;br /&gt;
We will skip this for now.&lt;br /&gt;
|-&lt;br /&gt;
|Point mouse over the ‘Criterion’ in the seventh row&lt;br /&gt;
&lt;br /&gt;
Click on empty cell in this row, under the Checked In field. &lt;br /&gt;
&lt;br /&gt;
Type ‘=0’&lt;br /&gt;
|and we will go to the ‘Criterion’ row. &lt;br /&gt;
&lt;br /&gt;
This is where we can limit the result set to a simple or complex set of criteria. &lt;br /&gt;
&lt;br /&gt;
For example, we can query for those books only, which were issued but have not been returned by members, &lt;br /&gt;
&lt;br /&gt;
meaning, only those that are not checked in. &lt;br /&gt;
&lt;br /&gt;
So let us click on the empty cell in this row, under the CheckedIn field &lt;br /&gt;
&lt;br /&gt;
and type in ‘Equals Zero’.&lt;br /&gt;
|-&lt;br /&gt;
|Go to Edit menu, &lt;br /&gt;
&lt;br /&gt;
click on Run Query&lt;br /&gt;
|Thats it,  let us run this query now. &lt;br /&gt;
&lt;br /&gt;
We can use the keyboard shortcut F5, or click on the Edit menu at the top of the window, &lt;br /&gt;
&lt;br /&gt;
and then click on ‘Run Query’ at the bottom.&lt;br /&gt;
|-&lt;br /&gt;
|Point mouse over the result set&lt;br /&gt;
As narration goes forward&lt;br /&gt;
&lt;br /&gt;
In the query design area below, delete the entry ‘=0’ in the criterion row.&lt;br /&gt;
Go to Edit menu, click on Run Query. &lt;br /&gt;
Point mouse over result set.&lt;br /&gt;
|Can you see some data in the upper part of the window? &lt;br /&gt;
&lt;br /&gt;
These are the results of our query. &lt;br /&gt;
&lt;br /&gt;
Notice that, we see a history of books issued to members and ordered by Issue Date. &lt;br /&gt;
&lt;br /&gt;
Also notice that none of the books are checked in. &lt;br /&gt;
&lt;br /&gt;
Now we can go to the query design area below and change it any way we want . &lt;br /&gt;
&lt;br /&gt;
For example, let us remove the Checked In criterion. &amp;lt;pause&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now let us run the query by pressing F5 again. &lt;br /&gt;
&lt;br /&gt;
This time we see a longer list of data returned from the query.&lt;br /&gt;
|-&lt;br /&gt;
|Press Control S. &lt;br /&gt;
&lt;br /&gt;
Type in ‘History of Books Issued to Members’. &lt;br /&gt;
&lt;br /&gt;
Click on Ok button.&lt;br /&gt;
&lt;br /&gt;
Close the window.&lt;br /&gt;
&lt;br /&gt;
Go back to main window. Click on the query name ‘History of Books Issued to Members’&lt;br /&gt;
|Next, let us save this query, by pressing Control S. This opens a small popup window. &lt;br /&gt;
&lt;br /&gt;
Let us give a descriptive name to our query here. &lt;br /&gt;
&lt;br /&gt;
Let us type ‘History of Books Issued to Members’ &lt;br /&gt;
&lt;br /&gt;
and click on the Ok button. &lt;br /&gt;
&lt;br /&gt;
and close this window.&lt;br /&gt;
&lt;br /&gt;
We can open this saved query by double clicking on the query name in the main Base window.&lt;br /&gt;
&lt;br /&gt;
So there, we have successfully created a query using the Design View.&lt;br /&gt;
|-&lt;br /&gt;
|Show Slide Number 3&lt;br /&gt;
Assignment: &lt;br /&gt;
Generate a list of the books issued to the member Nisha Sharma. The list should be chronological by Issue date.&lt;br /&gt;
|Here is an assignment:&lt;br /&gt;
&lt;br /&gt;
Generate a list of the books issued to the member Nisha Sharma. &lt;br /&gt;
&lt;br /&gt;
The list should be chronological by Issue date.&lt;br /&gt;
|-&lt;br /&gt;
|Show Slide Number 4&lt;br /&gt;
Summary&lt;br /&gt;
&lt;br /&gt;
* Create a query by using the Design View&lt;br /&gt;
&lt;br /&gt;
* Add tables to the Query Design window&lt;br /&gt;
&lt;br /&gt;
* Select fields &lt;br /&gt;
&lt;br /&gt;
* Set up aliases, &lt;br /&gt;
&lt;br /&gt;
* Set up sorting order&lt;br /&gt;
&lt;br /&gt;
* Provide search criteria&lt;br /&gt;
|This brings us to the end of this tutorial on Creating Queries in Design View in LibreOffice Base&lt;br /&gt;
&lt;br /&gt;
To summarize, we learned how to: &lt;br /&gt;
&lt;br /&gt;
Create a query by using the Design View.	&lt;br /&gt;
&lt;br /&gt;
Add tables to the Query Design window&lt;br /&gt;
&lt;br /&gt;
Select fields &lt;br /&gt;
&lt;br /&gt;
Set up aliases, &lt;br /&gt;
&lt;br /&gt;
Set up sorting order&lt;br /&gt;
&lt;br /&gt;
And provide search criteria for a query.&lt;br /&gt;
|-&lt;br /&gt;
|Acknowledgement Slide&lt;br /&gt;
|Spoken Tutorial Project is a part of the Talk to a Teacher project, supported by the National Mission on Education through ICT, MHRD, Government of India. This project is co-ordinated by http://spoken-tutorial.org. More information on the same is available at the following link http://spoken-tutorial.org/NMEICT-Intro. This script has been contributed by Priya Suresh, DesiCrew Solutions Pvt Ltd, signing off. Thanks for joining.&lt;br /&gt;
|-&lt;/div&gt;</summary>
		<author><name>Chandrika</name></author>	</entry>

	</feed>