ISQL Statements

insert into stores values (1001,chassis); insert into stores values (1002,chips); select * from stores where item_no > 1001; set echo off ;

To execute the above statements stored in a file named cmdfile, enter:

ISQL> @cmdfile

3.7.2BREAK

Syntax

BREAK [ ON break_spec [ SKIP n ] ] ; break_spec::

{ column_name [ , … ] ROW PAGE REPORT }

Description

The BREAK statement specifies at what point ISQL processes associated DISPLAY and COMPUTE statements. DISPLAY and COMPUTE statements have no effect until you issue a BREAK statement with the same break specification.

A break can be specified on any of the following events:

Change in the value of a column

Selection of each row

End of a page

End of a report

Only one BREAK statement can be in effect at a time. When a new BREAK statement is entered, it replaces the previous BREAK statement. The BREAK statement can specify one or more columns on which the break can occur.

The BREAK statement without any clauses displays the currently-set break, if any.

Arguments

break_spec

The events that cause an SQL query to be interrupted and the execution of the associated COMPUTE and DISPLAY statements. break_spec can be any of the following values:

column_name Causes a break when the value of the column specified by column_name changes.

ROW

Causes a break on every row selected by a SELECT statement.

FairCom Corporation

3-13

Page 39
Image 39
HP c-tree-SQL ISQL and Tools manual Break Syntax, Breakspec