Specifications
Creating and executing SQL statements
116 InfoMaker
Controlling comments
By default, InfoMaker strips off comments when it sends SQL to the DBMS.
You can have comments included by clearing the check mark next to Strip
Comments in the pop-up menu of the Interactive SQL view.
Entering SQL
You can enter a SQL statement in four ways:
• Pasting the statement
• Typing the statement in the view
• Opening a text file containing the SQL
• Dragging a procedure or function from the Objects view
Pasting SQL
You can paste SELECT, INSERT, UPDATE, and DELETE statements to the view.
Depending on which kind of statement you want to paste, InfoMaker displays
dialog boxes that guide you through painting the full statement.
❖ To paste a SQL statement to the workspace:
1 Click the Paste SQL button in the PainterBar, or select Paste Special>SQL
from the Edit or pop-up menu, then the statement type (Select, Insert,
Update, or Delete).
The Select Table(s) dialog box displays.
2 Select the table(s) you will reference in the SQL statement.
You go to the Select, Insert, Update, or Delete painter, depending on the
type of SQL statement you are pasting. The Insert, Update, and Delete
painters are similar to the Select painter, but only the appropriate tabs
display in the SQL toolbox at the bottom of the workspace.
For more information about the SQL Select painter, see “Selecting a data
source” on page 154.
3 Do one of the following:
•For a
SELECT statement, define the statement exactly as in the SQL
Select painter when building a view.
You choose the columns to select. You can define computed columns,
specify sorting and joining criteria, and
WHERE, GROUP BY, and
HAVING criteria. For more information, see “Working with database
views” on page 103.