Specifications
Creating and executing SQL statements
118 InfoMaker
Importing SQL from a
text file
You can import SQL that has been saved in a text file into the Database painter.
❖ To read SQL from a file:
1 Put the insertion point where you want to insert the SQL.
2 Select Paste Special>From File from the Edit or pop-up menu.
3 Select the file containing the SQL, and click OK.
Dragging a procedure
or function from the
Objects view
From the tree view in the Objects view, you can select an existing procedure or
function that contains a SQL statement you want to enter, and drag it to the
Interactive SQL view.
Explaining SQL
Sometimes there is more than one way to code SQL statements to obtain the
results you want. When this is the case, you can use Explain SQL on the Design
menu to help you select the most efficient method. Explain SQL displays
information about the path that InfoMaker will use to execute the statements in
the SQL Statement Execution Plan dialog box. This is most useful when you
are retrieving or updating data in an indexed column or using multiple tables.
DBMS-specific information
The information displayed in the SQL Statement Execution Plan dialog box
depends on your DBMS. For more about the SQL execution plan, see your
DBMS documentation.
Executing SQL
When you have the SQL statements you want in the workspace, you can submit
them to the DBMS.
❖ To execute the SQL:
• Click the Execute button, or select Design>Execute SQL from the menu
bar.
If the SQL retrieves data, the data appears in grid format in the Results view. If
there is a database error, you see a message box describing the problem.
For a description of what you can do with the data, see “Manipulating data” on
page 108.