isql Command SET TERM
Sets the terminator character(s) to avoid conflict with the terminator character in PSQL statements
ISQL only
SET TERM new_terminator old_terminator
Argument | Description |
---|---|
new_terminator |
New terminator |
old_terminator |
Old terminator |
When you write your triggers, stored procedures, stored functions or PSQL blocks in isql — either in the interactive interface or in scripts — running a SET TERM
statement is needed to switch the normal isql statement terminator from the semicolon to another character or short string, to avoid conflicts with the non-changeable semicolon terminator in PSQL.The switch to an alternative terminator needs to be done before you begin defining PSQL objects or running your scripts.
The alternative terminator can be any string of characters except for a space, an apostrophe or the current terminator character(s).Any letter character(s) used will be case-sensitive.
Changing the default semicolon to ‘^
’ (caret) and using it to submit a stored procedure definition: character as an alternative terminator character:
SET TERM ^;
CREATE OR ALTER PROCEDURE SHIP_ORDER (
PO_NUM CHAR(8))
AS
BEGIN
/* Stored procedure body */
END^
/* Other stored procedures and triggers */
SET TERM ;^
/* Other DDL statements */