home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Product
/
Product.zip
/
visquein.zip
/
FTB1OAT4.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1994-07-12
|
48KB
|
426 lines
ΓòÉΓòÉΓòÉ 1. Welcome ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
Welcome to the
Visualizer
Query Tutorial
(C) Copyright IBM Corporation 1994
Double-click on the arrow to continue.
ΓòÉΓòÉΓòÉ 2. Using this Tutorial ΓòÉΓòÉΓòÉ
Using this tutorial
The Visualizer tutorial windows have been designed to occupy only 40 percent of
your screen. This is to allow you to run Visualizer at the same time as viewing
a tutorial.
In this way you can perform the tutorial steps using the real product and not a
product simulation as in so many online tutorials.
Before you start to read the lesson steps, it is recommended that you will:
o Open the Visualizer folder
o Size the Visualizer window so that it fits neatly next to the tutorial window
By performing the tutorial steps using the real Visualizer product, you will
familiarize yourself with the feel, functions, and features of the product.
All the tutorials in the Visualizer product are structured in a similar way. If
you have not used a Visualizer tutorial before, double-click on any of the
following topics for further information:
o Highlighted terms
o Lessons and steps
o Why
o Which lessons to follow
ΓòÉΓòÉΓòÉ <hidden> Lessons and Steps ΓòÉΓòÉΓòÉ
Lessons and steps
Visualizer tutorials are divided into lessons and each lesson is further
divided into steps.
At the start of each lesson there is a lesson overview, followed by a list of
lesson steps. The lesson steps are hypertext links to the steps themselves. To
start the tutorial at the beginning, double-click on the first step.
At the end of each lesson there is an overview which recaps on the concepts and
steps you should be familiar with.
ΓòÉΓòÉΓòÉ <hidden> Highlighted Terms ΓòÉΓòÉΓòÉ
Highlighted terms
If you see any words or phrases that are highlighted like this: hypertext you
can double-click on them to get more information.
The information is displayed in a new window like this one. When you have
finished reading it, close the window in one of the following ways:
o Press the Esc key on your keyboard
o Double-click on the System menu
o Select Close from the System menu
ΓòÉΓòÉΓòÉ <hidden> Why ΓòÉΓòÉΓòÉ
Why
At the start of each lesson you will see this:
(Why?)
Double-clicking on the word (Why?) will display further information about the
purpose of the lesson and help to explain how the lesson is related to the
lessons which precede and follow it.
ΓòÉΓòÉΓòÉ <hidden> Which Lessons to Follow ΓòÉΓòÉΓòÉ
Which lessons to follow
If you are unfamiliar with Visualizer, we recommend that you work through each
lesson sequentially.
To do this, when you have read the overview of each lesson, double-click on the
title of the first lesson.
If you are familiar with some aspects of Visualizer, be selective about which
lessons you work through. Read all the lesson overviews before you select which
lessons you want to follow.
To go on to other lessons, follow the navigational help that is given at the
end of each lesson.
ΓòÉΓòÉΓòÉ 3. Visualizer Query Lessons ΓòÉΓòÉΓòÉ
Visualizer Query Lessons
Use Visualizer Query to select, combine, and analyze information stored in an
SQL database, or in files using a number of common data formats.
With Visualizer Query you can select just the information you need from your
data, without the need to understand SQL.
The data that a query provides is called the result of the query. This data is
not stored in the query, but is retrieved from other data sources when you run
the query. You must run a query before you can look at its result.
A query can be used as a source of data, just like a table, but as the query
does not hold the data, you cannot change the data itself.
Lesson 1: Defining a query
In this lesson you will learn how to create a query that combines the data from
more than one data table. It also teaches you how to select rows and columns
for a query and how to save your work.
This lesson takes 40 minutes to complete.
ΓòÉΓòÉΓòÉ 4. 1. Defining a Query ΓòÉΓòÉΓòÉ
Defining a query
In this lesson you will learn how to define a new query that combines data from
more than one table or view. You will also learn how to select specific rows
and columns for use in your query and how to save your work.
(Why?...)
Steps
1. Create a copy of the Query template.
2. Rename the query.
3. Select the query's data sources.
4. Link the data sources.
5. Select rows of data.
6. Select columns of data.
7. View the query results.
8. Save the changes then close the query.
ΓòÉΓòÉΓòÉ 4.1. 1.1 Copy the Template ΓòÉΓòÉΓòÉ
Open the Visualizer folder.
The Visualizer folder contains the Shadows of Templates folder.
Open the Shadows of Templates folder.
The Shadows of Templates folder contains templates for all the Visualizer
objects. You can use these templates to create your own Visualizer objects.
Drag the Visualizer Query template icon and drop it on the folder you want to
store the new query in.
You have now created a new query in your target folder.
ΓòÉΓòÉΓòÉ 4.2. 1.2 Rename the Query ΓòÉΓòÉΓòÉ
Open the folder where your new query is stored.
Hold down the Alt key.
Select your new query.
Release the Alt key.
Overtype the title with one of your own.
Select on an empty part of the folder to save your changes.
You have now renamed your new query and saved the changes.
ΓòÉΓòÉΓòÉ 4.3. 1.3 Select data sources ΓòÉΓòÉΓòÉ
You can select any of the following data sources to use in your query:
o SQL tables
o SQL views
o Visualizer tables
o Queries
All SQL tables and views in a query must be associated with the same database
object.
Double-click on your new query.
Your new query is now open.
If you can see the data icons for the sources you want, drag the icons one by
one and drop them onto your query.
The data icons you have dragged onto your query are now used as data sources
for your query. You can now go on to the next lesson.
Select from the tool bar, if you cannot see the icons for the data sources you
want.
You can also select the Query tool bar choices from the Query menus.
The Select Tables and Queries window opens for you to select the data sources
for your query, and the Selected Tables and Queries window opens for you to see
which data sources are already selected for your query.
In the Select Tables and Queries window describe the type (for example, SQL)
and the location of the data source you want to use, then identify the data
source by typing its name. For SQL database data sources, the location
comprises the database alias followed by a backslash (\) and a collection name.
The collection name is usually the user ID of the person who created the data
source.
The data sources you have selected are shown in the Selected Tables and Queries
window.
Select OK.
The data sources you have selected are now the data sources for your query.
Their names are shown in the upper half of the Query main window.
ΓòÉΓòÉΓòÉ 4.4. 1.4 Link Data Sources ΓòÉΓòÉΓòÉ
To combine related data from more than one data source, the data sources for
your query must be linked. This is done by linking columns from one data source
to related columns from another data source.
Links are shown by the symbol in a link entry > < in the upper half of the
Query window.
When you selected your data, Visualizer Query may have created links
automatically for your query. If there is already at least one link symbol ()
in all of the link entries in the upper half of the Query window, go on to the
next lesson. Otherwise create a link between your data sources by following
these steps:
Double-click on the link entry between the two data sources that you want to
link.
The Link Settings window opens.
Select the Auto join push button.
Select OK.
A link symbol () is placed in the upper half of the Query window showing that
a default link between your two selected data sources has been created.
Repeat the above steps until all the link entries in the upper half of the
Query window contain a link symbol.
Your data sources are now ready to be combined.
ΓòÉΓòÉΓòÉ 4.5. 1.5 Selecting rows ΓòÉΓòÉΓòÉ
Your query result can contain all the rows in the linked columns. If this is
what you want, you do not need to select specific rows. However, you may want
to use your query to select only those rows that fulfill a specified condition.
To select specific rows of data for your query, follow these steps:
Select from the tool bar.
The Select Rows window opens.
In the Expression field, type in an expression that specifies the rows you want
to use in your query. The following example is for an SQL table. It selects
rows containing the values New York and Montreal from the Depot column:
"Depot"='New York' OR "Depot"='Montreal'
The following example is for a Visualizer table:
Depot="New York" OR Depot="Montreal"
If you are not familiar with the syntax for Visualizer expressions, select the
... push button for help.
Select OK.
The Select rows window closes.
ΓòÉΓòÉΓòÉ 4.6. 1.6 Select columns ΓòÉΓòÉΓòÉ
Your query result can contain all the columns in the linked data sources. If
this is what you want, you do not need to select specific columns. However, you
may want to use your query to select only those columns that fulfill a
specified condition. To select specific columns of data for your query, follow
these steps:
Select from the tool bar.
The Select Columns window opens with all the columns selected.
Deselect the columns you do not want in your query result.
If you want to use only a few of all the available columns, it is quicker to
select the Deselect all push button and then select the columns you want to
use.
Select OK.
The Select Columns window closes and the columns you have chosen are used in
your query result.
ΓòÉΓòÉΓòÉ 4.7. 1.7 View the Results ΓòÉΓòÉΓòÉ
The data that a query provides is called the result of the query. This data is
not stored in the query, but is retrieved from the query's data sources when
you run the query.
You must run a query before you can look at its results.
Select from the tool bar.
The result of the query is displayed in the browsing window.
You can run a query when the query is closed. To do this:
1. Display the pop-up menu for the query icon.
2. Select the arrow to the right of the Open choice.
3. Select Run query.
Select from the tool bar to view the result as a table.
The query result for many rows and columns is displayed.
Select from the tool bar to view the result as a form.
The query result for a single item is displayed.
ΓòÉΓòÉΓòÉ 4.8. 1.8 Save and Close ΓòÉΓòÉΓòÉ
Select from the tool bar.
The changes you have just made to your query have been saved.
Double-click on the small icon in the title bar.
Your query is now closed.
ΓòÉΓòÉΓòÉ <hidden> Why Define a Query? ΓòÉΓòÉΓòÉ
On many occasions the data you need has to be taken from several sources, but
you need to present it and use it as a single data source. Visualizer Query is
an efficient and easy way of combining data from several data sources. You can
use Visualizer Query to combine complex data sources into a single source that
will answer your current data needs.
This lesson teaches you how to create a simple query and introduces you to some
important query concepts. When you have completed this lesson, you can build on
your knowledge to create more advanced queries using the techniques available
with Visualizer Query.
ΓòÉΓòÉΓòÉ 5. Tutorial Review ΓòÉΓòÉΓòÉ
Reviewing the Query Tutorial
You should now feel confident about creating a Visualizer query. You should
have an understanding of how to:
o Open a Visualizer query
o Rename a query
o Select and link query data sources
o Select rows and columns of data
o Save a query
o Close the query window
Understand what you did?
If you feel you did not understand all you did, consider going through the
lessons again. Next time, double-click on all of the (Why?...) fields for
lesson explanations and on all of the highlighted text fields for conceptual
information.
For more information
You can find conceptual, control and task information in the Visualizer online
help and in Visualizer Query for OS/2: Using, SH45-5089-00. An online version
of this book is also provided in your Manuals folder.
What to do now
You have now completed the Visualizer Query tutorial.
If you would like to repeat the tutorial, double-click here on the back-page
button: Alternatively, close the tutorial window by double-clicking on the
small icon in the title bar.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
This is a footnote window. The highlighted terms in this tutorial are usually
displayed in larger windows. Press the escape key on your keyboard to close the
footnote.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
This is a footnote window. Why information is usually displayed in larger
windows.