Neoview Script Guide (R2.2)

GEORGE STRICKER 3100
OTTO SCHNABL 3200
TIM WALKER 3000
TED MCDONALD 2000
PETER SMITH 3300
MARK FOLEY 4000
HEIDI WEIGL 3200
ROCKY LEWIS 2000
SUE CRAMER 1000
MARTIN SCHAEFFER 3200
HERBERT KARAJAN 3200
JESSICA CRINER 3500
--- 35 row(s) selected.
SQL>
This EXECUTE statement executes the prepared findemp statement, which has two unnamed
parameters: ?sal, which was set by SET PARAM for the salary, and a parameter that was not
set in advance for the job code:
SQL>execute findemp using ?sal, 100;
EMPNUM FIRST_NAME LAST_NAME DEPTNUM JOBCODE SALARY
------ --------------- -------------- ------- ------- --------
213 ROBERT WHITE 1500 100 90000.00
23 JERRY HOWARD 1000 100 137000.10
1 ROGER GREEN 9000 100 175500.00
29 JANE RAYMOND 3000 100 136000.00
32 THOMAS RUDLOFF 2000 100 138000.40
43 PAUL WINTER 3100 100 90000.00
65 RACHEL MCKAY 4000 100 118000.00
--- 7 row(s) selected.
SQL>
For the syntax of the EXECUTE statement, see the Neoview SQL Reference Manual.
Executing CREATE TRIGGER Statements
To execute CREATE TRIGGER statements using Neoview Script, you must specify a “/” in the
first column on a new line at the end of the CREATE TRIGGER statement.
SQL>create trigger handlecheckout
+> after insert on checkout
+> referencing new as newr
+> for each row
+> begin atomic
+> update member set dues = dues + 10
+> where memberid = newr.memberid;
+> update book set ischecked = 1
+> where bookid = newr.bookid;
+> end;
+> /
For the syntax of the CREATE TRIGGER statement, see the Neoview SQL Reference Manual.
Executing CREATE TRIGGER Statements 67