home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Product
/
Product.zip
/
visquein.zip
/
FTB1OATS.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1994-07-12
|
48KB
|
355 lines
ΓòÉΓòÉΓòÉ 1. Welcome ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
Welcome to the
Visualizer
SQL Statement 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 SQL Statement Lessons ΓòÉΓòÉΓòÉ
Visualizer SQL Statement Lessons
Use Visualizer SQL Statement to create, run, and store an SQL statement and to
view, manipulate, or print any result.
An SQL statement object is used to hold executable SQL statements that can be
dynamically prepared. This includes the most common statements used for the
following tasks:
o Creating, updating, and deleting tables and views
o Creating an index
o Selecting data
o Controlling access to data
Visualizer SQL statements are usually defined by experienced SQL users, but
once they are defined anyone can use them.
Lesson 1: Running an SQL Statement
In this lesson you will learn how to run a Visualizer SQL statement. Running an
SQL statement does not require any previous knowledge of SQL.
This lesson takes 10 minutes to complete.
Lesson 2: Defining an SQL Statement
In this lesson you will learn how to define a Visualizer SQL statement.
Defining an SQL statement requires knowledge of SQL.
This lesson takes 15 minutes to complete.
ΓòÉΓòÉΓòÉ 4. 1. Running an SQL Statement ΓòÉΓòÉΓòÉ
Running an SQL statement
In this lesson you will learn how to run a Visualizer SQL statement and view
the result. It assumes that the Visualizer SQL statement has been previously
created and requires no previous knowledge of SQL from you.
(Why?...)
Steps
1. Run the SQL statement object.
2. Browse and save the results.
ΓòÉΓòÉΓòÉ 4.1. 1.1 Run the SQL Statement ΓòÉΓòÉΓòÉ
Open the folder where the SQL statement object is stored.
Select the SQL statement object.
The pop-up menu for the SQL statement is displayed.
Select the arrow to the right of Open.
The cascaded menu for Open is displayed.
Select Run SQL.
If Run SQL has a check mark next to it, it is the default selection on the
cascaded menu. In this case, you can run the SQL statement by simply
double-clicking on its icon.
The results of the statement are displayed in a data browsing window.
ΓòÉΓòÉΓòÉ 4.2. 1.2 Browse and Save the Results ΓòÉΓòÉΓòÉ
Scroll through the data in the data browsing window.
As the data is displayed in a data browsing window you can look at the result,
but you cannot update it. However, you can save the result in several different
data formats.
Select Export from the Results menu in the Data Viewer window.
The Export window is displayed.
Save the result as a Visualizer table. This will mean that you can look at it
at a later time and make any changes to it that you want.
ΓòÉΓòÉΓòÉ <hidden> Why Run an SQL Statement ΓòÉΓòÉΓòÉ
SQL statements can be used to automate data retrieval and management tasks.
Tasks such as retrieving data from a database, creating and deleting tables in
a database, preparing an index on a table, or granting and revoking privileges
on a database.
Once they have been defined, SQL statements are very easy to use. They make
what could be complicated database tasks into tasks that are quick and easy to
execute.
In addition, they allow a user who is not familiar with SQL to execute SQL
database retrieval and administrative tasks which they would otherwise not be
able to do.
This lesson explains just how quick and easy it is to run an SQL statement to
retrieve data from an SQL database.
ΓòÉΓòÉΓòÉ 5. 2. Defining an SQL Statement ΓòÉΓòÉΓòÉ
Defining an SQL statement
In this lesson you will create and define a new SQL statement.
In order to complete this lesson you must have previous knowledge of SQL.
(Why?...)
Steps
1. Create a copy of the template SQL Statement.
2. Rename your SQL statement.
3. Associate it with a database.
4. Type your SQL statements.
5. Save your changes and close the object.
ΓòÉΓòÉΓòÉ 5.1. 2.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 SQL Statement template icon and drop it on the folder where
you want to store the new SQL statement.
You have now created a new Visualizer SQL statement object in your target
folder.
ΓòÉΓòÉΓòÉ 5.2. 2.2 Rename the SQL Statement ΓòÉΓòÉΓòÉ
Open the folder where your new Visualizer SQL statement is stored.
Hold down the Alt key.
Select your new Visualizer SQL statement.
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 SQL statement object and saved the changes.
ΓòÉΓòÉΓòÉ 5.3. 2.3 Associate it with a Database ΓòÉΓòÉΓòÉ
Open your new Visualizer SQL statement.
Just below the tool bar is a list called Database.
From the databases in the Database list, select the name of the database that
this SQL statement is to be associated with.
The SQL statement connects to this database when it is run, but the SQL
statement is not stored in the database.
ΓòÉΓòÉΓòÉ 5.4. 2.4 Type in SQL statements ΓòÉΓòÉΓòÉ
Just below the Database list is a large entry field. Use this entry field to
type in your SQL statements. You can edit your statements using the standard
keyboard editing keys, and use the clipboard functions from the Edit menu.
Type your SQL statements in the entry field.
An SQL statement object can contain one SQL statement with any appropriate
subclauses. You can use most of the common SQL statements for selecting data,
creating and deleting tables and views, creating indexes, and for granting and
revoking privileges.
ΓòÉΓòÉΓòÉ 5.5. 2.5 Save and Close ΓòÉΓòÉΓòÉ
Select from the tool bar.
The changes you have just made to your new SQL statement have been saved.
Double-click on the small icon in the title bar.
The SQL statement you have created is closed.
ΓòÉΓòÉΓòÉ <hidden> Why Define an SQL Statement? ΓòÉΓòÉΓòÉ
Visualizer SQL statements allow you to harness your SQL expertise so that users
with little or no knowledge of SQL can access a database and perform routine
administrative tasks.
Without the help of Visualizer SQL statements, all these tasks would have to be
performed by you. With the help of Visualizer SQL statements, you are free to
work on other more advanced and demanding jobs.
This lesson shows you how easy it is to create a Visualizer SQL statement that
can be used by others.
ΓòÉΓòÉΓòÉ 6. Tutorial Review ΓòÉΓòÉΓòÉ
Reviewing the SQL Statement Tutorial
You should now feel confident about running a Visualizer SQL statement and, if
you are familiar with SQL, defining a Visualizer SQL statement.
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 SQL Statement 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.