ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/testsuite/FB4reference.log
(Generate patch)

Comparing ibx/trunk/testsuite/FB4reference.log (file contents):
Revision 340 by tony, Wed Jul 7 11:53:54 2021 UTC vs.
Revision 349 by tony, Mon Oct 18 08:39:40 2021 UTC

# Line 641 | Line 641 | DEPT_KEY_PATH = 000;900 (Charset = UTF8
641  
642   Rows printed = 42
643  
644 < Current memory = 19,686,512
644 > Current memory = 19,688,352
645   Delta memory = 16,384
646 < Max memory = 19,781,408
647 < Elapsed time= 0.015 sec
646 > Max memory = 19,783,248
647 > Elapsed time= 0.025 sec
648   Cpu = 0.010 sec
649   Buffers = 2048
650   Reads = 2
# Line 1445 | Line 1445 | DPB: Item Count = 3
1445    isc_dpb_lc_ctype = UTF8
1446  
1447   Before Disconnect
1448 < inet://localhost/employee Disconnected after 20 ms
1448 > inet://localhost/employee Disconnected after 42 ms
1449   Before Connect
1450   Connected to inet://localhost/employee
1451   DPB: Item Count = 3
# Line 1454 | Line 1454 | DPB: Item Count = 3
1454    isc_dpb_lc_ctype = UTF8
1455  
1456   Before Disconnect
1457 < inet://localhost/employee Disconnected after 4019 ms
1457 > inet://localhost/employee Disconnected after 4039 ms
1458   Idle Timer Expired for Test_Database_02
1459   Database Closed
1460   Transaction Events
# Line 1477 | Line 1477 | TPB: Item Count = 3
1477    isc_tpb_read
1478  
1479   Transaction Ending
1480 < Transaction Ended after 1 ms
1480 > Transaction Ended after 0 ms
1481   Transaction idle timer test
1482   Requested TPB: Item Count = 3
1483    isc_tpb_concurrency
# Line 1491 | Line 1491 | TPB: Item Count = 3
1491    isc_tpb_read
1492  
1493   Transaction Ending
1494 < Transaction Ended after 1999 ms
1494 > Transaction Ended after 2001 ms
1495   Idle Timer Expired for Test_Transaction_02
1496   Before Disconnect
1497 < inet://localhost/employee Disconnected after 2038 ms
1497 > inet://localhost/employee Disconnected after 2040 ms
1498   SQL Dialect Downgrade test
1499   Before Connect
1500   Connected to inet://localhost//tmp/ibx-testsuite/testsuite1.fdb
# Line 1506 | Line 1506 | DPB: Item Count = 4
1506  
1507   inet://localhost//tmp/ibx-testsuite/testsuite1.fdb created
1508   Before Disconnect
1509 < inet://localhost//tmp/ibx-testsuite/testsuite1.fdb Disconnected after 29 ms
1509 > inet://localhost//tmp/ibx-testsuite/testsuite1.fdb Disconnected after 24 ms
1510   Before Connect
1511   Warning: SQL Dialect Downgrade of inet://localhost//tmp/ibx-testsuite/testsuite1.fdb
1512   Connected to inet://localhost//tmp/ibx-testsuite/testsuite1.fdb
# Line 1516 | Line 1516 | DPB: Item Count = 3
1516    isc_dpb_lc_ctype = UTF8
1517  
1518   Before Disconnect
1519 < inet://localhost//tmp/ibx-testsuite/testsuite1.fdb Disconnected after 76 ms
1519 > inet://localhost//tmp/ibx-testsuite/testsuite1.fdb Disconnected after 26 ms
1520  
1521  
1522   ------------------------------------------------------
# Line 1531 | Line 1531 | on disk structure version 13.0
1531   FB Version: Firebird/Linux/AMD/Intel/x64 (access method), version "LI-V4.0.0.2496 Firebird 4.0", Firebird/Linux/AMD/Intel/x64 (remote server), version "LI-V4.0.0.2496 Firebird 4.0/tcp (zeus)/P16:CZ", Firebird/Linux/AMD/Intel/x64 (remote interface), version "LI-V4.0.0.2496 Firebird 4.0/tcp (zeus)/P16:CZ", on disk structure version 13.0
1532   Firebird Library Pathname = /opt/firebird4.0.0/lib/libfbclient.so
1533   DB SQLDialect = 3
1534 < Allocation = 346
1534 > Allocation = 1075
1535   Base Level = 4
1536   DB File Name = /opt/firebird4.0.0/examples/empbuild/employee.fdb
1537   DB Site Name = zeus
# Line 1543 | Line 1543 | ODS Minor Version = 0
1543   ODS Major Version = 13
1544   Page Size = 8192
1545   Version = LI-V6.3.0.2496 Firebird 4.0
1546 < Current Memory = 19501200
1546 > Current Memory = 19503040
1547   Forced Writes Enabled
1548 < Max Memory = 19627808
1548 > Max Memory = 19629648
1549   Number of Buffers = 2048
1550   Sweep Interval = 20000
1551   User Names: SYSDBA
1552 < Fetches = 1840
1552 > Fetches = 1855
1553   Marks = 8
1554 < Reads = 99
1554 > Reads = 100
1555   Writes = 2
1556 < Pages Free = 310
1557 < Pages Used = 36
1556 > Pages Free = 313
1557 > Pages Used = 762
1558   Transaction Count = 1
1559  
1560   Read Idx Count
# Line 1565 | Line 1565 | Read Idx Count
1565    RDB$SECURITY_CLASSES = 8
1566    RDB$TYPES = 2
1567    RDB$TRIGGERS = 25
1568 <  RDB$USER_PRIVILEGES = 805
1568 >  RDB$USER_PRIVILEGES = 816
1569    RDB$GENERATORS = 5
1570    RDB$CHARACTER_SETS = 2
1571    RDB$COLLATIONS = 2
1572    RDB$ROLES = 1
1573  
1574   Read Seq Count
1575 <  RDB$PAGES = 98
1575 >  RDB$PAGES = 100
1576    RDB$DATABASE = 25
1577 <  RDB$RELATIONS = 65
1577 >  RDB$RELATIONS = 66
1578  
1579   Database is Read/Write
1580   Hex Dump of Database Page 100:
# Line 2411 | Line 2411 | ALTER DATABASE SET DEFAULT SQL SECURITY
2411  
2412   /* Table: IBXTEST, Owner: SYSDBA */
2413  
2414 < CREATE TABLE IBXTEST
2414 > CREATE TABLE IBXTEST
2415   (
2416          TABLEKEY        INTEGER NOT NULL,
2417          F1      TIMESTAMP WITH TIME ZONE,
2418          F2      TIME WITH TIME ZONE,
2419          F3      DECFLOAT(16),
2420          F4      DECFLOAT(34),
2421 <        F5      NUMERIC(24, 6),
2421 >        F5      NUMERIC(24,6),
2422          F6      INT128,
2423   PRIMARY KEY (TABLEKEY)
2424   ) SQL SECURITY DEFINER;
# Line 3297 | Line 3297 | SALARY = 32,000.00
3297   FULL_NAME = Guckenheimer, Mark
3298   DEPT_PATH = Corporate Headquarters / Engineering / Software Products Div. / Quality Assurance (Charset Id = 4 Codepage = 65001)
3299   DEPT_KEY_PATH = 000;600;620;622 (Charset Id = 4 Codepage = 65001)
3300 < Current memory = 19,667,232
3300 > Current memory = 19,669,072
3301   Delta memory = 16,416
3302 < Max memory = 19,762,896
3303 < Elapsed time= 0.026 sec
3302 > Max memory = 19,764,736
3303 > Elapsed time= 0.025 sec
3304   Cpu = 0.020 sec
3305   Buffers = 2048
3306   Reads = 2
# Line 3902 | Line 3902 | SET AUTODDL ON;
3902   /* Domain definitions */
3903  
3904   CREATE DOMAIN ADDRESSLINE AS VARCHAR(30);
3905 < CREATE DOMAIN BUDGET AS DECIMAL(12, 2)
3905 > CREATE DOMAIN BUDGET AS DECIMAL(12,2)
3906           DEFAULT 50000;
3907   CREATE DOMAIN COUNTRYNAME AS VARCHAR(15);
3908   CREATE DOMAIN CUSTNO AS INTEGER;
# Line 3917 | Line 3917 | CREATE DOMAIN PONUMBER AS CHAR(8);
3917   CREATE DOMAIN PRODTYPE AS VARCHAR(12)
3918           DEFAULT 'software' NOT NULL;
3919   CREATE DOMAIN PROJNO AS CHAR(5);
3920 < CREATE DOMAIN SALARY AS NUMERIC(10, 2)
3920 > CREATE DOMAIN SALARY AS NUMERIC(10,2)
3921           DEFAULT 0;
3922  
3923   /* Table: COUNTRY, Owner: SYSDBA */
3924  
3925 < CREATE TABLE COUNTRY
3925 > CREATE TABLE COUNTRY
3926   (
3927          COUNTRY COUNTRYNAME NOT NULL,
3928          CURRENCY        VARCHAR(10) NOT NULL,
# Line 3931 | Line 3931 | PRIMARY KEY (COUNTRY)
3931  
3932   /* Table: CUSTOMER, Owner: SYSDBA */
3933  
3934 < CREATE TABLE CUSTOMER
3934 > CREATE TABLE CUSTOMER
3935   (
3936          CUST_NO CUSTNO NOT NULL,
3937          CUSTOMER        VARCHAR(25) NOT NULL,
# Line 3950 | Line 3950 | PRIMARY KEY (CUST_NO)
3950  
3951   /* Table: DEPARTMENT, Owner: SYSDBA */
3952  
3953 < CREATE TABLE DEPARTMENT
3953 > CREATE TABLE DEPARTMENT
3954   (
3955          DEPT_NO DEPTNO NOT NULL,
3956          DEPARTMENT      VARCHAR(25) NOT NULL,
# Line 3965 | Line 3965 | PRIMARY KEY (DEPT_NO)
3965  
3966   /* Table: EMPLOYEE, Owner: SYSDBA */
3967  
3968 < CREATE TABLE EMPLOYEE
3968 > CREATE TABLE EMPLOYEE
3969   (
3970          EMP_NO  EMPNO NOT NULL,
3971          FIRST_NAME      FIRSTNAME NOT NULL,
# Line 3983 | Line 3983 | PRIMARY KEY (EMP_NO)
3983  
3984   /* Table: EMPLOYEE_PROJECT, Owner: SYSDBA */
3985  
3986 < CREATE TABLE EMPLOYEE_PROJECT
3986 > CREATE TABLE EMPLOYEE_PROJECT
3987   (
3988          EMP_NO  EMPNO NOT NULL,
3989          PROJ_ID PROJNO NOT NULL,
# Line 3992 | Line 3992 | PRIMARY KEY (EMP_NO, PROJ_ID)
3992  
3993   /* Table: JOB, Owner: SYSDBA */
3994  
3995 < CREATE TABLE JOB
3995 > CREATE TABLE JOB
3996   (
3997          JOB_CODE        JOBCODE NOT NULL,
3998          JOB_GRADE       JOBGRADE NOT NULL,
# Line 4005 | Line 4005 | CREATE TABLE JOB
4005   PRIMARY KEY (JOB_CODE, JOB_GRADE, JOB_COUNTRY)
4006   );
4007  
4008 + /* Table: LOTSOFDATA, Owner: SYSDBA */
4009 +
4010 + CREATE TABLE LOTSOFDATA
4011 + (
4012 +        ROWID   INTEGER NOT NULL,
4013 +        THEDATE TIMESTAMP,
4014 +        MYTEXT  VARCHAR(1024),
4015 + PRIMARY KEY (ROWID)
4016 + );
4017 +
4018   /* Table: PROJECT, Owner: SYSDBA */
4019  
4020 < CREATE TABLE PROJECT
4020 > CREATE TABLE PROJECT
4021   (
4022          PROJ_ID PROJNO NOT NULL,
4023          PROJ_NAME       VARCHAR(20) NOT NULL,
# Line 4020 | Line 4030 | PRIMARY KEY (PROJ_ID)
4030  
4031   /* Table: PROJ_DEPT_BUDGET, Owner: SYSDBA */
4032  
4033 < CREATE TABLE PROJ_DEPT_BUDGET
4033 > CREATE TABLE PROJ_DEPT_BUDGET
4034   (
4035          FISCAL_YEAR     INTEGER NOT NULL,
4036          PROJ_ID PROJNO NOT NULL,
# Line 4032 | Line 4042 | PRIMARY KEY (FISCAL_YEAR, PROJ_ID, DEPT_
4042  
4043   /* Table: SALARY_HISTORY, Owner: SYSDBA */
4044  
4045 < CREATE TABLE SALARY_HISTORY
4045 > CREATE TABLE SALARY_HISTORY
4046   (
4047          EMP_NO  EMPNO NOT NULL,
4048          CHANGE_DATE     TIMESTAMP DEFAULT 'NOW' NOT NULL,
# Line 4045 | Line 4055 | PRIMARY KEY (EMP_NO, CHANGE_DATE, UPDATE
4055  
4056   /* Table: SALES, Owner: SYSDBA */
4057  
4058 < CREATE TABLE SALES
4058 > CREATE TABLE SALES
4059   (
4060          PO_NUMBER       PONUMBER NOT NULL,
4061          CUST_NO CUSTNO NOT NULL,
# Line 4056 | Line 4066 | CREATE TABLE SALES
4066          DATE_NEEDED     TIMESTAMP,
4067          PAID    CHAR(1) DEFAULT 'n',
4068          QTY_ORDERED     INTEGER DEFAULT 1 NOT NULL,
4069 <        TOTAL_VALUE     DECIMAL(9, 2) NOT NULL,
4069 >        TOTAL_VALUE     DECIMAL(9,2) NOT NULL,
4070          DISCOUNT        FLOAT DEFAULT 0 NOT NULL,
4071          ITEM_TYPE       PRODTYPE,
4072          AGED COMPUTED BY (ship_date - order_date),
# Line 4098 | Line 4108 | CREATE SEQUENCE EMP_NO_GEN;
4108   /* View: PHONE_LIST, Owner: SYSDBA */
4109  
4110   CREATE VIEW PHONE_LIST (
4111 <  EMP_NO,
4112 <  FIRST_NAME,
4113 <  LAST_NAME,
4114 <  PHONE_EXT,
4115 <  LOCATION,
4111 >  EMP_NO,
4112 >  FIRST_NAME,
4113 >  LAST_NAME,
4114 >  PHONE_EXT,
4115 >  LOCATION,
4116    PHONE_NO
4117   ) AS
4118   SELECT
# Line 4200 | Line 4210 | CREATE EXCEPTION REASSIGN_SALES 'Reassig
4210   CREATE EXCEPTION UNKNOWN_EMP_ID 'Invalid employee number or project id.';
4211   COMMIT WORK;
4212   SET AUTODDL OFF;
4213 < SET TERM ^ ;
4213 > SET TERM ^;
4214  
4215   /* Stored procedures Definitions*/
4216  
4217 < CREATE PROCEDURE SHOW_LANGS
4217 > CREATE PROCEDURE SHOW_LANGS
4218   (
4219    CODE VARCHAR(5) CHARACTER SET NONE,
4220    GRADE SMALLINT,
# Line 4216 | Line 4226 | RETURNS
4226   )
4227   AS
4228   BEGIN SUSPEND; EXIT; END
4219
4229   ^
4230  
4231 < CREATE PROCEDURE ADD_EMP_PROJ
4231 > CREATE PROCEDURE ADD_EMP_PROJ
4232   (
4233    EMP_NO SMALLINT,
4234    PROJ_ID CHAR(5) CHARACTER SET NONE
4235   )
4236   AS
4237   BEGIN EXIT; END
4229
4238   ^
4239  
4240 < CREATE PROCEDURE ALL_LANGS
4240 > CREATE PROCEDURE ALL_LANGS
4241   RETURNS
4242   (
4243    CODE VARCHAR(5) CHARACTER SET NONE,
# Line 4239 | Line 4247 | RETURNS
4247   )
4248   AS
4249   BEGIN SUSPEND; EXIT; END
4242
4250   ^
4251  
4252 < CREATE PROCEDURE DELETE_EMPLOYEE
4252 > CREATE PROCEDURE DELETE_EMPLOYEE
4253   (
4254    EMP_NUM INTEGER
4255   )
4256   AS
4257   BEGIN EXIT; END
4251
4258   ^
4259  
4260 < CREATE PROCEDURE DEPT_BUDGET
4260 > CREATE PROCEDURE DEPT_BUDGET
4261   (
4262    DNO CHAR(3) CHARACTER SET NONE
4263   )
4264   RETURNS
4265   (
4266 <  TOT DECIMAL(12, 2)
4266 >  TOT DECIMAL(12,2)
4267   )
4268   AS
4269   BEGIN SUSPEND; EXIT; END
4264
4270   ^
4271  
4272 < CREATE PROCEDURE GET_EMP_PROJ
4272 > CREATE PROCEDURE GET_EMP_PROJ
4273   (
4274    EMP_NO SMALLINT
4275   )
# Line 4274 | Line 4279 | RETURNS
4279   )
4280   AS
4281   BEGIN SUSPEND; EXIT; END
4277
4282   ^
4283  
4284 < CREATE PROCEDURE MAIL_LABEL
4284 > CREATE PROCEDURE MAIL_LABEL
4285   (
4286    CUST_NO INTEGER
4287   )
# Line 4292 | Line 4296 | RETURNS
4296   )
4297   AS
4298   BEGIN SUSPEND; EXIT; END
4295
4299   ^
4300  
4301 < CREATE PROCEDURE ORG_CHART
4301 > CREATE PROCEDURE ORG_CHART
4302   RETURNS
4303   (
4304    HEAD_DEPT CHAR(25) CHARACTER SET NONE,
# Line 4306 | Line 4309 | RETURNS
4309   )
4310   AS
4311   BEGIN SUSPEND; EXIT; END
4309
4312   ^
4313  
4314 < CREATE PROCEDURE SHIP_ORDER
4314 > CREATE PROCEDURE SHIP_ORDER
4315   (
4316    PO_NUM CHAR(8) CHARACTER SET NONE
4317   )
4318   AS
4319   BEGIN EXIT; END
4318
4320   ^
4321  
4322 < CREATE PROCEDURE SUB_TOT_BUDGET
4322 > CREATE PROCEDURE SUB_TOT_BUDGET
4323   (
4324    HEAD_DEPT CHAR(3) CHARACTER SET NONE
4325   )
4326   RETURNS
4327   (
4328 <  TOT_BUDGET DECIMAL(12, 2),
4329 <  AVG_BUDGET DECIMAL(12, 2),
4330 <  MIN_BUDGET DECIMAL(12, 2),
4331 <  MAX_BUDGET DECIMAL(12, 2)
4328 >  TOT_BUDGET DECIMAL(12,2),
4329 >  AVG_BUDGET DECIMAL(12,2),
4330 >  MIN_BUDGET DECIMAL(12,2),
4331 >  MAX_BUDGET DECIMAL(12,2)
4332   )
4333   AS
4334   BEGIN SUSPEND; EXIT; END
4334
4335   ^
4336  
4337 < SET TERM ; ^
4337 > SET TERM ;^
4338   COMMIT WORK;
4339   SET AUTODDL ON;
4340 < SET TERM ^ ;
4340 > SET TERM ^;
4341  
4342  
4343   /* Triggers only will work for SQL triggers */
# Line 4349 | Line 4349 | BEGIN
4349      if (new.cust_no is null) then
4350      new.cust_no = gen_id(cust_no_gen, 1);
4351   END
4352 < ^
4352 > ^
4353 >
4354   CREATE TRIGGER SET_EMP_NO FOR EMPLOYEE
4355   ACTIVE BEFORE INSERT POSITION 0
4356   AS
# Line 4357 | Line 4358 | BEGIN
4358      if (new.emp_no is null) then
4359      new.emp_no = gen_id(emp_no_gen, 1);
4360   END
4361 < ^
4361 > ^
4362 >
4363   CREATE TRIGGER SAVE_SALARY_CHANGE FOR EMPLOYEE
4364   ACTIVE AFTER UPDATE POSITION 0
4365   AS
# Line 4372 | Line 4374 | BEGIN
4374              old.salary,
4375              (new.salary - old.salary) * 100 / old.salary);
4376   END
4377 < ^
4377 > ^
4378 >
4379   CREATE TRIGGER POST_NEW_ORDER FOR SALES
4380   ACTIVE AFTER INSERT POSITION 0
4381   AS
4382   BEGIN
4383      POST_EVENT 'new_order';
4384   END
4385 < ^
4386 < COMMIT WORK ^
4385 > ^
4386 >
4387 > COMMIT WORK^
4388   SET TERM ;^
4389   COMMIT WORK;
4390   SET AUTODDL OFF;
4391 < SET TERM ^ ;
4391 > SET TERM ^;
4392  
4393   /* Stored procedure Bodies */
4394  
4395 <
4392 < ALTER PROCEDURE SHOW_LANGS
4395 > ALTER PROCEDURE SHOW_LANGS
4396   (
4397    CODE VARCHAR(5) CHARACTER SET NONE,
4398    GRADE SMALLINT,
# Line 4415 | Line 4418 | BEGIN
4418      SUSPEND;
4419    END
4420   END
4421 < ^
4419 <
4421 > ^
4422  
4423 < ALTER PROCEDURE ADD_EMP_PROJ
4423 > ALTER PROCEDURE ADD_EMP_PROJ
4424   (
4425    EMP_NO SMALLINT,
4426    PROJ_ID CHAR(5) CHARACTER SET NONE
# Line 4431 | Line 4433 | BEGIN
4433                  EXCEPTION unknown_emp_id;
4434          END
4435   END
4436 < ^
4435 <
4436 > ^
4437  
4438 < ALTER PROCEDURE ALL_LANGS
4438 > ALTER PROCEDURE ALL_LANGS
4439   RETURNS
4440   (
4441    CODE VARCHAR(5) CHARACTER SET NONE,
# Line 4460 | Line 4461 | BEGIN
4461              SUSPEND;
4462          END
4463      END
4464 < ^
4464 <
4464 > ^
4465  
4466 < ALTER PROCEDURE DELETE_EMPLOYEE
4466 > ALTER PROCEDURE DELETE_EMPLOYEE
4467   (
4468    EMP_NUM INTEGER
4469   )
# Line 4519 | Line 4519 | BEGIN
4519          DELETE FROM employee
4520          WHERE emp_no = :emp_num;
4521   END
4522 < ^
4523 <
4522 > ^
4523  
4524 < ALTER PROCEDURE DEPT_BUDGET
4524 > ALTER PROCEDURE DEPT_BUDGET
4525   (
4526    DNO CHAR(3) CHARACTER SET NONE
4527   )
4528   RETURNS
4529   (
4530 <  TOT DECIMAL(12, 2)
4530 >  TOT DECIMAL(12,2)
4531   )
4532   AS
4533   DECLARE VARIABLE sumb DECIMAL(12, 2);
# Line 4556 | Line 4555 | BEGIN
4555  
4556          SUSPEND;
4557   END
4558 < ^
4560 <
4558 > ^
4559  
4560 < ALTER PROCEDURE GET_EMP_PROJ
4560 > ALTER PROCEDURE GET_EMP_PROJ
4561   (
4562    EMP_NO SMALLINT
4563   )
# Line 4576 | Line 4574 | BEGIN
4574          DO
4575                  SUSPEND;
4576   END
4577 < ^
4580 <
4577 > ^
4578  
4579 < ALTER PROCEDURE MAIL_LABEL
4579 > ALTER PROCEDURE MAIL_LABEL
4580   (
4581    CUST_NO INTEGER
4582   )
# Line 4647 | Line 4644 | BEGIN
4644  
4645          SUSPEND;
4646   END
4647 < ^
4651 <
4647 > ^
4648  
4649 < ALTER PROCEDURE ORG_CHART
4649 > ALTER PROCEDURE ORG_CHART
4650   RETURNS
4651   (
4652    HEAD_DEPT CHAR(25) CHARACTER SET NONE,
# Line 4690 | Line 4686 | BEGIN
4686                  SUSPEND;
4687          END
4688   END
4689 < ^
4694 <
4689 > ^
4690  
4691 < ALTER PROCEDURE SHIP_ORDER
4691 > ALTER PROCEDURE SHIP_ORDER
4692   (
4693    PO_NUM CHAR(8) CHARACTER SET NONE
4694   )
# Line 4744 | Line 4739 | BEGIN
4739          SET order_status = 'shipped', ship_date = 'NOW'
4740          WHERE po_number = :po_num;
4741   END
4742 < ^
4748 <
4742 > ^
4743  
4744 < ALTER PROCEDURE SUB_TOT_BUDGET
4744 > ALTER PROCEDURE SUB_TOT_BUDGET
4745   (
4746    HEAD_DEPT CHAR(3) CHARACTER SET NONE
4747   )
4748   RETURNS
4749   (
4750 <  TOT_BUDGET DECIMAL(12, 2),
4751 <  AVG_BUDGET DECIMAL(12, 2),
4752 <  MIN_BUDGET DECIMAL(12, 2),
4753 <  MAX_BUDGET DECIMAL(12, 2)
4750 >  TOT_BUDGET DECIMAL(12,2),
4751 >  AVG_BUDGET DECIMAL(12,2),
4752 >  MIN_BUDGET DECIMAL(12,2),
4753 >  MAX_BUDGET DECIMAL(12,2)
4754   )
4755   AS
4756   BEGIN
# Line 4766 | Line 4760 | BEGIN
4760                  INTO :tot_budget, :avg_budget, :min_budget, :max_budget;
4761          SUSPEND;
4762   END
4763 < ^
4763 > ^
4764  
4765 < SET TERM ; ^
4765 > SET TERM ;^
4766   COMMIT WORK;
4767   SET AUTODDL ON;
4768  
# Line 4812 | Line 4806 | SET AUTODDL ON;
4806  
4807   CREATE DATABASE 'inet://localhost//tmp/ibx-testsuite/testsuite1.fdb' PAGE_SIZE 8192
4808  
4809 < DEFAULT CHARACTER SET NONE;
4809 > DEFAULT CHARACTER SET NONE;
4810   COMMENT ON DATABASE  IS 'Employee Test DB';
4811  
4812   /* Domain definitions */
4813  
4814   CREATE DOMAIN ADDRESSLINE AS VARCHAR(30);
4815 < CREATE DOMAIN BUDGET AS DECIMAL(12, 2)
4815 > CREATE DOMAIN BUDGET AS DECIMAL(12,2)
4816           DEFAULT 50000;
4817   CREATE DOMAIN COUNTRYNAME AS VARCHAR(15);
4818   CREATE DOMAIN CUSTNO AS INTEGER;
# Line 4834 | Line 4828 | CREATE DOMAIN PONUMBER AS CHAR(8);
4828   CREATE DOMAIN PRODTYPE AS VARCHAR(12)
4829           DEFAULT 'software' NOT NULL;
4830   CREATE DOMAIN PROJNO AS CHAR(5);
4831 < CREATE DOMAIN SALARY AS NUMERIC(10, 2)
4831 > CREATE DOMAIN SALARY AS NUMERIC(10,2)
4832           DEFAULT 0;
4833  
4834   /* Table: COUNTRIES, Owner: SYSDBA */
4835  
4836 < CREATE TABLE COUNTRIES
4836 > CREATE TABLE COUNTRIES
4837   (
4838          COUNTRY VARCHAR(64) NOT NULL,
4839          NONEU   SMALLINT,
# Line 4852 | Line 4846 | COMMENT ON COLUMN COUNTRIES.ISO2 IS 'Two
4846  
4847   /* Table: COUNTRY, Owner: SYSDBA */
4848  
4849 < CREATE TABLE COUNTRY
4849 > CREATE TABLE COUNTRY
4850   (
4851          COUNTRY COUNTRYNAME NOT NULL,
4852          CURRENCY        VARCHAR(10) NOT NULL,
# Line 4861 | Line 4855 | PRIMARY KEY (COUNTRY)
4855  
4856   /* Table: CUSTOMER, Owner: SYSDBA */
4857  
4858 < CREATE TABLE CUSTOMER
4858 > CREATE TABLE CUSTOMER
4859   (
4860          CUST_NO CUSTNO NOT NULL,
4861          CUSTOMER        VARCHAR(25) NOT NULL,
# Line 4881 | Line 4875 | PRIMARY KEY (CUST_NO)
4875  
4876   /* Table: DEPARTMENT, Owner: SYSDBA */
4877  
4878 < CREATE TABLE DEPARTMENT
4878 > CREATE TABLE DEPARTMENT
4879   (
4880          DEPT_NO DEPTNO NOT NULL,
4881          DEPARTMENT      VARCHAR(25) NOT NULL,
# Line 4896 | Line 4890 | PRIMARY KEY (DEPT_NO)
4890  
4891   /* Table: EMPLOYEE, Owner: SYSDBA */
4892  
4893 < CREATE TABLE EMPLOYEE
4893 > CREATE TABLE EMPLOYEE
4894   (
4895          EMP_NO  EMPNO NOT NULL,
4896          FIRST_NAME      FIRSTNAME NOT NULL,
# Line 4914 | Line 4908 | PRIMARY KEY (EMP_NO)
4908  
4909   /* Table: EMPLOYEE_PROJECT, Owner: SYSDBA */
4910  
4911 < CREATE TABLE EMPLOYEE_PROJECT
4911 > CREATE TABLE EMPLOYEE_PROJECT
4912   (
4913          EMP_NO  EMPNO NOT NULL,
4914          PROJ_ID PROJNO NOT NULL,
# Line 4923 | Line 4917 | PRIMARY KEY (EMP_NO, PROJ_ID)
4917  
4918   /* Table: FB$OUT_TABLE, Owner: SYSDBA */
4919  
4920 < CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE
4920 > CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE
4921   (
4922          LINE_NUM        INTEGER,
4923          CONTENT FB$OUT_TYPE
# Line 4931 | Line 4925 | CREATE GLOBAL TEMPORARY TABLE FB$OUT_TAB
4925  
4926   /* Table: ITEST, Owner: SYSDBA */
4927  
4928 < CREATE TABLE ITEST
4928 > CREATE TABLE ITEST
4929   (
4930          "KEY"   INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0) NOT NULL,
4931          SOMETEXT        VARCHAR(64),
# Line 4940 | Line 4934 | PRIMARY KEY ("KEY")
4934  
4935   /* Table: ITEST2, Owner: SYSDBA */
4936  
4937 < CREATE TABLE ITEST2
4937 > CREATE TABLE ITEST2
4938   (
4939          "KEY"   INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL,
4940          SOMETEXT        VARCHAR(64),
# Line 4949 | Line 4943 | PRIMARY KEY ("KEY")
4943  
4944   /* Table: JOB, Owner: SYSDBA */
4945  
4946 < CREATE TABLE JOB
4946 > CREATE TABLE JOB
4947   (
4948          JOB_CODE        JOBCODE NOT NULL,
4949          JOB_GRADE       JOBGRADE NOT NULL,
# Line 4964 | Line 4958 | PRIMARY KEY (JOB_CODE, JOB_GRADE, JOB_CO
4958  
4959   /* Table: PROJECT, Owner: SYSDBA */
4960  
4961 < CREATE TABLE PROJECT
4961 > CREATE TABLE PROJECT
4962   (
4963          PROJ_ID PROJNO NOT NULL,
4964          PROJ_NAME       VARCHAR(20) NOT NULL,
# Line 4977 | Line 4971 | PRIMARY KEY (PROJ_ID)
4971  
4972   /* Table: PROJ_DEPT_BUDGET, Owner: SYSDBA */
4973  
4974 < CREATE TABLE PROJ_DEPT_BUDGET
4974 > CREATE TABLE PROJ_DEPT_BUDGET
4975   (
4976          FISCAL_YEAR     INTEGER NOT NULL,
4977          PROJ_ID PROJNO NOT NULL,
# Line 4989 | Line 4983 | PRIMARY KEY (FISCAL_YEAR, PROJ_ID, DEPT_
4983  
4984   /* Table: SALARY_HISTORY, Owner: SYSDBA */
4985  
4986 < CREATE TABLE SALARY_HISTORY
4986 > CREATE TABLE SALARY_HISTORY
4987   (
4988          EMP_NO  EMPNO NOT NULL,
4989          CHANGE_DATE     TIMESTAMP DEFAULT 'NOW' NOT NULL,
# Line 5002 | Line 4996 | PRIMARY KEY (EMP_NO, CHANGE_DATE, UPDATE
4996  
4997   /* Table: SALES, Owner: SYSDBA */
4998  
4999 < CREATE TABLE SALES
4999 > CREATE TABLE SALES
5000   (
5001          PO_NUMBER       PONUMBER NOT NULL,
5002          CUST_NO CUSTNO NOT NULL,
# Line 5013 | Line 5007 | CREATE TABLE SALES
5007          DATE_NEEDED     TIMESTAMP,
5008          PAID    CHAR(1) DEFAULT 'n',
5009          QTY_ORDERED     INTEGER DEFAULT 1 NOT NULL,
5010 <        TOTAL_VALUE     DECIMAL(9, 2) NOT NULL,
5010 >        TOTAL_VALUE     DECIMAL(9,2) NOT NULL,
5011          DISCOUNT        FLOAT DEFAULT 0 NOT NULL,
5012          ITEM_TYPE       PRODTYPE,
5013          AGED COMPUTED BY (ship_date - order_date),
# Line 5026 | Line 5020 | DECLARE EXTERNAL FUNCTION ADDDAY
5020   TIMESTAMP, INTEGER
5021   RETURNS TIMESTAMP
5022   ENTRY_POINT 'addDay' MODULE_NAME 'fbudf'
5029
5023   ;
5024  
5025  
5026   DECLARE EXTERNAL FUNCTION I64TRUNCATE
5027 < NUMERIC(18, 0) BY DESCRIPTOR, NUMERIC(18, 0) BY DESCRIPTOR
5027 > NUMERIC(18,0) BY DESCRIPTOR, NUMERIC(18,0) BY DESCRIPTOR
5028   RETURNS PARAMETER 2
5029   ENTRY_POINT 'fbtruncate' MODULE_NAME 'fbudf'
5037
5030   ;
5031  
5032  
# Line 5042 | Line 5034 | DECLARE EXTERNAL FUNCTION TESTIT
5034   TIMESTAMP, INTEGER NULL, CSTRING(10) CHARACTER SET NONE, CSTRING(10) CHARACTER SET NONE BY DESCRIPTOR
5035   RETURNS CSTRING(32) CHARACTER SET NONE FREE_IT
5036   ENTRY_POINT 'testit' MODULE_NAME 'fbudf'
5045
5037   ;
5038  
5039  
# Line 5784 | Line 5775 | ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 1
5775   /* View: DEPTLIST, Owner: SYSDBA */
5776  
5777   CREATE VIEW DEPTLIST (
5778 <  EMP_NO,
5779 <  FIRST_NAME,
5780 <  LAST_NAME,
5781 <  PHONE_EXT,
5782 <  HIRE_DATE,
5783 <  DEPT_NO,
5784 <  JOB_CODE,
5785 <  JOB_GRADE,
5786 <  JOB_COUNTRY,
5787 <  SALARY,
5788 <  FULL_NAME,
5789 <  DEPT_PATH,
5790 <  DEPT_KEY_PATH
5778 >  EMP_NO,
5779 >  FIRST_NAME,
5780 >  LAST_NAME,
5781 >  PHONE_EXT,
5782 >  HIRE_DATE,
5783 >  DEPT_NO,
5784 >  JOB_CODE,
5785 >  JOB_GRADE,
5786 >  JOB_COUNTRY,
5787 >  SALARY,
5788 >  FULL_NAME,
5789 >  DEPT_PATH,
5790 >  DEPT_KEY_PATH,
5791 >  "Payment Status"
5792   ) AS
5793   with recursive Depts As (
5794   Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT  as VarChar(256)) as DEPT_PATH,
# Line 5810 | Line 5802 | JOIN Depts On D.HEAD_DEPT = Depts.DEPT_N
5802   )
5803  
5804   Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE,
5805 < A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH
5805 > A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH,
5806 > CASE When A.SALARY > 10000 then 'higher paid' else 'lower paid' End
5807   From EMPLOYEE A
5808   JOIN Depts D On D.DEPT_NO = A.DEPT_NO
5809   ;
# Line 5818 | Line 5811 | JOIN Depts D On D.DEPT_NO = A.DEPT_NO
5811   /* View: PHONE_LIST, Owner: SYSDBA */
5812  
5813   CREATE VIEW PHONE_LIST (
5814 <  EMP_NO,
5815 <  FIRST_NAME,
5816 <  LAST_NAME,
5817 <  PHONE_EXT,
5818 <  LOCATION,
5814 >  EMP_NO,
5815 >  FIRST_NAME,
5816 >  LAST_NAME,
5817 >  PHONE_EXT,
5818 >  LOCATION,
5819    PHONE_NO
5820   ) AS
5821   SELECT
# Line 5924 | Line 5917 | CREATE EXCEPTION REASSIGN_SALES 'Reassig
5917   CREATE EXCEPTION UNKNOWN_EMP_ID 'Invalid employee number or project id.';
5918   COMMIT WORK;
5919   SET AUTODDL OFF;
5920 < SET TERM ^ ;
5920 > SET TERM ^;
5921  
5922   /* Package Definitions */
5923  
5924 < CREATE PACKAGE FB$OUT                                                        
5924 > CREATE PACKAGE FB$OUT
5925   AS
5933
5926   begin
5927          procedure enable;
5928          procedure disable;
# Line 5940 | Line 5932 | begin
5932  
5933          procedure get_lines returns (lines fb$out_type);
5934   end
5935 < ^
5935 > ^
5936  
5937 < CREATE PACKAGE SELECT$TEST                                                    
5937 > CREATE PACKAGE SELECT$TEST
5938   AS
5947
5939   Begin
5940    Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer);
5941   End
5942 < ^
5942 > ^
5943  
5944 < SET TERM ; ^
5944 > SET TERM ;^
5945   COMMIT WORK;
5946   SET AUTODDL ON;
5947   COMMIT WORK;
5948   SET AUTODDL OFF;
5949 < SET TERM ^ ;
5949 > SET TERM ^;
5950  
5951   /* Stored procedures Definitions*/
5952  
5953 < CREATE PROCEDURE SHOW_LANGS
5953 > CREATE PROCEDURE SHOW_LANGS
5954   (
5955    CODE VARCHAR(5) CHARACTER SET NONE,
5956    GRADE SMALLINT,
# Line 5971 | Line 5962 | RETURNS
5962   )
5963   AS
5964   BEGIN SUSPEND; EXIT; END
5974
5965   ^
5966  
5967 < CREATE PROCEDURE ADD_EMP_PROJ
5967 > CREATE PROCEDURE ADD_EMP_PROJ
5968   (
5969    EMP_NO SMALLINT,
5970    PROJ_ID CHAR(5) CHARACTER SET NONE
5971   )
5972   AS
5973   BEGIN EXIT; END
5984
5974   ^
5975  
5976 < CREATE PROCEDURE ALL_LANGS
5976 > CREATE PROCEDURE ALL_LANGS
5977   RETURNS
5978   (
5979    CODE VARCHAR(5) CHARACTER SET NONE,
# Line 5994 | Line 5983 | RETURNS
5983   )
5984   AS
5985   BEGIN SUSPEND; EXIT; END
5997
5986   ^
5987  
5988 < CREATE PROCEDURE DELETE_EMPLOYEE
5988 > CREATE PROCEDURE DELETE_EMPLOYEE
5989   (
5990    EMP_NUM INTEGER
5991   )
5992   AS
5993   BEGIN EXIT; END
6006
5994   ^
5995  
5996 < CREATE PROCEDURE DEPT_BUDGET
5996 > CREATE PROCEDURE DEPT_BUDGET
5997   (
5998    DNO CHAR(3) CHARACTER SET NONE
5999   )
6000   RETURNS
6001   (
6002 <  TOT DECIMAL(12, 2)
6002 >  TOT DECIMAL(12,2)
6003   )
6004   AS
6005   BEGIN SUSPEND; EXIT; END
6006 + ^
6007  
6008 + CREATE PROCEDURE EMPLOYEE_PAY_STATUS
6009 + (
6010 +  EMP_NUM SMALLINT
6011 + )
6012 + RETURNS
6013 + (
6014 +  PAY_STATUS VARCHAR(6) CHARACTER SET NONE,
6015 +  SALARY NUMERIC(10,2)
6016 + )
6017 + AS
6018 + BEGIN EXIT; END
6019   ^
6020  
6021 < CREATE PROCEDURE GET_EMP_PROJ
6021 > CREATE PROCEDURE GET_EMP_PROJ
6022   (
6023    EMP_NO SMALLINT
6024   )
# Line 6029 | Line 6028 | RETURNS
6028   )
6029   AS
6030   BEGIN SUSPEND; EXIT; END
6032
6031   ^
6032  
6033 < CREATE PROCEDURE "Has Space"
6033 > CREATE PROCEDURE "Has Space"
6034   (
6035    ARG1 INTEGER
6036   )
6037   AS
6038   BEGIN EXIT; END
6041
6039   ^
6040  
6041 < CREATE PROCEDURE MAIL_LABEL
6041 > CREATE PROCEDURE MAIL_LABEL
6042   (
6043    CUST_NO INTEGER
6044   )
# Line 6056 | Line 6053 | RETURNS
6053   )
6054   AS
6055   BEGIN SUSPEND; EXIT; END
6059
6056   ^
6057  
6058 < CREATE PROCEDURE ORG_CHART
6058 > CREATE PROCEDURE ORG_CHART
6059   RETURNS
6060   (
6061    HEAD_DEPT CHAR(25) CHARACTER SET NONE,
# Line 6070 | Line 6066 | RETURNS
6066   )
6067   AS
6068   BEGIN SUSPEND; EXIT; END
6073
6069   ^
6070  
6071 < CREATE PROCEDURE SHIP_ORDER
6071 > CREATE PROCEDURE SHIP_ORDER
6072   (
6073    PO_NUM CHAR(8) CHARACTER SET NONE
6074   )
6075   AS
6076   BEGIN EXIT; END
6082
6077   ^
6078  
6079 < CREATE PROCEDURE SUB_TOT_BUDGET
6079 > CREATE PROCEDURE SUB_TOT_BUDGET
6080   (
6081    HEAD_DEPT CHAR(3) CHARACTER SET NONE
6082   )
6083   RETURNS
6084   (
6085 <  TOT_BUDGET DECIMAL(12, 2),
6086 <  AVG_BUDGET DECIMAL(12, 2),
6087 <  MIN_BUDGET DECIMAL(12, 2),
6088 <  MAX_BUDGET DECIMAL(12, 2)
6085 >  TOT_BUDGET DECIMAL(12,2),
6086 >  AVG_BUDGET DECIMAL(12,2),
6087 >  MIN_BUDGET DECIMAL(12,2),
6088 >  MAX_BUDGET DECIMAL(12,2)
6089   )
6090   AS
6091   BEGIN SUSPEND; EXIT; END
6098
6092   ^
6093  
6094 < CREATE PROCEDURE "UC SPACE"
6094 > CREATE PROCEDURE "UC SPACE"
6095   (
6096    ARG1 INTEGER
6097   )
6098   AS
6099   BEGIN EXIT; END
6107
6100   ^
6101  
6102 < CREATE PROCEDURE "iCASE"
6102 > CREATE PROCEDURE "iCASE"
6103   AS
6104   BEGIN EXIT; END
6113
6105   ^
6106  
6107 < SET TERM ; ^
6107 > SET TERM ;^
6108   COMMIT WORK;
6109   SET AUTODDL ON;
6110   COMMIT WORK;
6111   SET AUTODDL OFF;
6112 < SET TERM ^ ;
6112 > SET TERM ^;
6113  
6114   /* Stored Function declarations */
6115  
6116   CREATE FUNCTION F (X INTEGER)
6117   RETURNS INTEGER
6118   AS BEGIN END
6128
6119   ^
6120  
6121 <
6132 < SET TERM ; ^
6121 > SET TERM ;^
6122   COMMIT WORK;
6123   SET AUTODDL ON;
6124 < SET TERM ^ ;
6124 > SET TERM ^;
6125  
6126  
6127   /* Triggers only will work for SQL triggers */
# Line 6142 | Line 6131 | ACTIVE ON CONNECT POSITION 0
6131   as
6132   begin
6133   End
6134 < ^
6134 > ^
6135 >
6136   CREATE TRIGGER "BEFORE CREATE TABLE"
6137   ACTIVE BEFORE CREATE TABLE POSITION 0
6138   AS BEGIN END
6139 < ^
6139 > ^
6140 >
6141   CREATE TRIGGER "AFTER CREATE TABLE"
6142   ACTIVE AFTER CREATE TABLE POSITION 0
6143   AS BEGIN END
6144 < ^
6144 > ^
6145 >
6146   CREATE TRIGGER "BEFORE ALTER TABLE"
6147   ACTIVE BEFORE ALTER TABLE POSITION 0
6148   AS BEGIN END
6149 < ^
6149 > ^
6150 >
6151   CREATE TRIGGER "AFTER ALTER TABLE"
6152   ACTIVE AFTER ALTER TABLE POSITION 0
6153   AS BEGIN END
6154 < ^
6154 > ^
6155 >
6156   CREATE TRIGGER "AFTER CREATE/Alter TABLE"
6157   ACTIVE AFTER CREATE TABLE OR ALTER TABLE POSITION 0
6158   AS BEGIN END
6159 < ^
6159 > ^
6160 >
6161   CREATE TRIGGER "BEFORE DROP TABLE"
6162   ACTIVE BEFORE Drop TABLE POSITION 0
6163   AS BEGIN END
6164 < ^
6164 > ^
6165 >
6166   CREATE TRIGGER "AFTER DROP TABLE"
6167   ACTIVE AFTER Drop TABLE POSITION 0
6168   AS BEGIN END
6169 < ^
6169 > ^
6170 >
6171   CREATE TRIGGER "BEFORE CREATE PROCEDURE"
6172   ACTIVE BEFORE CREATE PROCEDURE POSITION 0
6173   AS BEGIN END
6174 < ^
6174 > ^
6175 >
6176   CREATE TRIGGER "AFTER CREATE PROCEDURE"
6177   ACTIVE AFTER CREATE PROCEDURE POSITION 0
6178   AS BEGIN END
6179 < ^
6179 > ^
6180 >
6181   CREATE TRIGGER "BEFORE ALTER PROCEDURE"
6182   ACTIVE BEFORE ALTER PROCEDURE POSITION 0
6183   AS BEGIN END
6184 < ^
6184 > ^
6185 >
6186   CREATE TRIGGER "AFTER ALTER PROCEDURE"
6187   ACTIVE AFTER ALTER PROCEDURE POSITION 0
6188   AS BEGIN END
6189 < ^
6189 > ^
6190 >
6191   CREATE TRIGGER "BEFORE DROP PROCEDURE"
6192   ACTIVE BEFORE Drop PROCEDURE POSITION 0
6193   AS BEGIN END
6194 < ^
6194 > ^
6195 >
6196   CREATE TRIGGER "AFTER DROP PROCEDURE"
6197   ACTIVE AFTER Drop PROCEDURE POSITION 0
6198   AS BEGIN END
6199 < ^
6199 > ^
6200 >
6201   CREATE TRIGGER "BEFORE CREATE FUNCTION"
6202   ACTIVE BEFORE CREATE FUNCTION POSITION 0
6203   AS BEGIN END
6204 < ^
6204 > ^
6205 >
6206   CREATE TRIGGER "AFTER CREATE FUNCTION"
6207   ACTIVE AFTER CREATE FUNCTION POSITION 0
6208   AS BEGIN END
6209 < ^
6209 > ^
6210 >
6211   CREATE TRIGGER "BEFORE ALTER FUNCTION"
6212   ACTIVE BEFORE ALTER FUNCTION POSITION 0
6213   AS BEGIN END
6214 < ^
6214 > ^
6215 >
6216   CREATE TRIGGER "AFTER ALTER FUNCTION"
6217   ACTIVE AFTER ALTER FUNCTION POSITION 0
6218   AS BEGIN END
6219 < ^
6219 > ^
6220 >
6221   CREATE TRIGGER "BEFORE DROP FUNCTION"
6222   ACTIVE BEFORE Drop FUNCTION POSITION 0
6223   AS BEGIN END
6224 < ^
6224 > ^
6225 >
6226   CREATE TRIGGER "AFTER DROP FUNCTION"
6227   ACTIVE AFTER Drop FUNCTION POSITION 0
6228   AS BEGIN END
6229 < ^
6229 > ^
6230 >
6231   CREATE TRIGGER "BEFORE CREATE TRIGGER"
6232   ACTIVE BEFORE CREATE TRIGGER POSITION 0
6233   AS BEGIN END
6234 < ^
6234 > ^
6235 >
6236   CREATE TRIGGER "AFTER CREATE TRIGGER"
6237   ACTIVE AFTER CREATE TRIGGER POSITION 0
6238   AS BEGIN END
6239 < ^
6239 > ^
6240 >
6241   CREATE TRIGGER "BEFORE ALTER TRIGGER"
6242   ACTIVE BEFORE ALTER TRIGGER POSITION 0
6243   AS BEGIN END
6244 < ^
6244 > ^
6245 >
6246   CREATE TRIGGER "AFTER ALTER TRIGGER"
6247   ACTIVE AFTER ALTER TRIGGER POSITION 0
6248   AS BEGIN END
6249 < ^
6249 > ^
6250 >
6251   CREATE TRIGGER "BEFORE DROP TRIGGER"
6252   ACTIVE BEFORE Drop TRIGGER POSITION 0
6253   AS BEGIN END
6254 < ^
6254 > ^
6255 >
6256   CREATE TRIGGER "AFTER DROP TRIGGER"
6257   ACTIVE AFTER Drop TRIGGER POSITION 0
6258   AS BEGIN END
6259 < ^
6259 > ^
6260 >
6261   CREATE TRIGGER "BEFORE CREATE EXCEPTION"
6262   ACTIVE BEFORE CREATE EXCEPTION POSITION 0
6263   AS BEGIN END
6264 < ^
6264 > ^
6265 >
6266   CREATE TRIGGER "AFTER CREATE EXCEPTION"
6267   ACTIVE AFTER CREATE EXCEPTION POSITION 0
6268   AS BEGIN END
6269 < ^
6269 > ^
6270 >
6271   CREATE TRIGGER "BEFORE ALTER EXCEPTION"
6272   ACTIVE BEFORE ALTER EXCEPTION POSITION 0
6273   AS BEGIN END
6274 < ^
6274 > ^
6275 >
6276   CREATE TRIGGER "AFTER ALTER EXCEPTION"
6277   ACTIVE AFTER ALTER EXCEPTION POSITION 0
6278   AS BEGIN END
6279 < ^
6279 > ^
6280 >
6281   CREATE TRIGGER "BEFORE DROP EXCEPTION"
6282   ACTIVE BEFORE Drop EXCEPTION POSITION 0
6283   AS BEGIN END
6284 < ^
6284 > ^
6285 >
6286   CREATE TRIGGER "AFTER DROP EXCEPTION"
6287   ACTIVE AFTER Drop EXCEPTION POSITION 0
6288   AS BEGIN END
6289 < ^
6289 > ^
6290 >
6291   CREATE TRIGGER "BEFORE CREATE VIEW"
6292   ACTIVE BEFORE CREATE VIEW POSITION 0
6293   AS BEGIN END
6294 < ^
6294 > ^
6295 >
6296   CREATE TRIGGER "AFTER CREATE VIEW"
6297   ACTIVE AFTER CREATE VIEW POSITION 0
6298   AS BEGIN END
6299 < ^
6299 > ^
6300 >
6301   CREATE TRIGGER "BEFORE ALTER VIEW"
6302   ACTIVE BEFORE ALTER VIEW POSITION 0
6303   AS BEGIN END
6304 < ^
6304 > ^
6305 >
6306   CREATE TRIGGER "AFTER ALTER VIEW"
6307   ACTIVE AFTER ALTER VIEW POSITION 0
6308   AS BEGIN END
6309 < ^
6309 > ^
6310 >
6311   CREATE TRIGGER "BEFORE DROP VIEW"
6312   ACTIVE BEFORE Drop VIEW POSITION 0
6313   AS BEGIN END
6314 < ^
6314 > ^
6315 >
6316   CREATE TRIGGER "AFTER DROP VIEW"
6317   ACTIVE AFTER Drop VIEW POSITION 0
6318   AS BEGIN END
6319 < ^
6319 > ^
6320 >
6321   CREATE TRIGGER "BEFORE CREATE DOMAIN"
6322   ACTIVE BEFORE CREATE DOMAIN POSITION 0
6323   AS BEGIN END
6324 < ^
6324 > ^
6325 >
6326   CREATE TRIGGER "AFTER CREATE DOMAIN"
6327   ACTIVE AFTER CREATE DOMAIN POSITION 0
6328   AS BEGIN END
6329 < ^
6329 > ^
6330 >
6331   CREATE TRIGGER "BEFORE ALTER DOMAIN"
6332   ACTIVE BEFORE ALTER DOMAIN POSITION 0
6333   AS BEGIN END
6334 < ^
6334 > ^
6335 >
6336   CREATE TRIGGER "AFTER ALTER DOMAIN"
6337   ACTIVE AFTER ALTER DOMAIN POSITION 0
6338   AS BEGIN END
6339 < ^
6339 > ^
6340 >
6341   CREATE TRIGGER "BEFORE DROP DOMAIN"
6342   ACTIVE BEFORE Drop DOMAIN POSITION 0
6343   AS BEGIN END
6344 < ^
6344 > ^
6345 >
6346   CREATE TRIGGER "AFTER DROP DOMAIN"
6347   ACTIVE AFTER Drop DOMAIN POSITION 0
6348   AS BEGIN END
6349 < ^
6349 > ^
6350 >
6351   CREATE TRIGGER "BEFORE CREATE ROLE"
6352   ACTIVE BEFORE CREATE ROLE POSITION 0
6353   AS BEGIN END
6354 < ^
6354 > ^
6355 >
6356   CREATE TRIGGER "AFTER CREATE ROLE"
6357   ACTIVE AFTER CREATE ROLE POSITION 0
6358   AS BEGIN END
6359 < ^
6359 > ^
6360 >
6361   CREATE TRIGGER "BEFORE ALTER ROLE"
6362   ACTIVE BEFORE ALTER ROLE POSITION 0
6363   AS BEGIN END
6364 < ^
6364 > ^
6365 >
6366   CREATE TRIGGER "AFTER ALTER ROLE"
6367   ACTIVE AFTER ALTER ROLE POSITION 0
6368   AS BEGIN END
6369 < ^
6369 > ^
6370 >
6371   CREATE TRIGGER "BEFORE DROP ROLE"
6372   ACTIVE BEFORE Drop ROLE POSITION 0
6373   AS BEGIN END
6374 < ^
6374 > ^
6375 >
6376   CREATE TRIGGER "AFTER DROP ROLE"
6377   ACTIVE AFTER Drop ROLE POSITION 0
6378   AS BEGIN END
6379 < ^
6379 > ^
6380 >
6381   CREATE TRIGGER "BEFORE CREATE INDEX"
6382   ACTIVE BEFORE CREATE INDEX POSITION 0
6383   AS BEGIN END
6384 < ^
6384 > ^
6385 >
6386   CREATE TRIGGER "AFTER CREATE INDEX"
6387   ACTIVE AFTER CREATE INDEX POSITION 0
6388   AS BEGIN END
6389 < ^
6389 > ^
6390 >
6391   CREATE TRIGGER "BEFORE ALTER INDEX"
6392   ACTIVE BEFORE ALTER INDEX POSITION 0
6393   AS BEGIN END
6394 < ^
6394 > ^
6395 >
6396   CREATE TRIGGER "AFTER ALTER INDEX"
6397   ACTIVE AFTER ALTER INDEX POSITION 0
6398   AS BEGIN END
6399 < ^
6399 > ^
6400 >
6401   CREATE TRIGGER "BEFORE DROP INDEX"
6402   ACTIVE BEFORE Drop INDEX POSITION 0
6403   AS BEGIN END
6404 < ^
6404 > ^
6405 >
6406   CREATE TRIGGER "AFTER DROP INDEX"
6407   ACTIVE AFTER Drop INDEX POSITION 0
6408   AS BEGIN END
6409 < ^
6409 > ^
6410 >
6411   CREATE TRIGGER "BEFORE CREATE SEQUENCE"
6412   ACTIVE BEFORE CREATE SEQUENCE POSITION 0
6413   AS BEGIN END
6414 < ^
6414 > ^
6415 >
6416   CREATE TRIGGER "AFTER CREATE SEQUENCE"
6417   ACTIVE AFTER CREATE SEQUENCE POSITION 0
6418   AS BEGIN END
6419 < ^
6419 > ^
6420 >
6421   CREATE TRIGGER "BEFORE ALTER SEQUENCE"
6422   ACTIVE BEFORE ALTER SEQUENCE POSITION 0
6423   AS BEGIN END
6424 < ^
6424 > ^
6425 >
6426   CREATE TRIGGER "AFTER ALTER SEQUENCE"
6427   ACTIVE AFTER ALTER SEQUENCE POSITION 0
6428   AS BEGIN END
6429 < ^
6429 > ^
6430 >
6431   CREATE TRIGGER "BEFORE DROP SEQUENCE"
6432   ACTIVE BEFORE Drop SEQUENCE POSITION 0
6433   AS BEGIN END
6434 < ^
6434 > ^
6435 >
6436   CREATE TRIGGER "AFTER DROP SEQUENCE"
6437   ACTIVE AFTER Drop SEQUENCE POSITION 0
6438   AS BEGIN END
6439 < ^
6439 > ^
6440 >
6441   CREATE TRIGGER "BEFORE CREATE USER"
6442   ACTIVE BEFORE CREATE USER POSITION 0
6443   AS BEGIN END
6444 < ^
6444 > ^
6445 >
6446   CREATE TRIGGER "AFTER CREATE USER"
6447   ACTIVE AFTER CREATE USER POSITION 0
6448   AS BEGIN END
6449 < ^
6449 > ^
6450 >
6451   CREATE TRIGGER "BEFORE ALTER USER"
6452   ACTIVE BEFORE ALTER USER POSITION 0
6453   AS BEGIN END
6454 < ^
6454 > ^
6455 >
6456   CREATE TRIGGER "AFTER ALTER USER"
6457   ACTIVE AFTER ALTER USER POSITION 0
6458   AS BEGIN END
6459 < ^
6459 > ^
6460 >
6461   CREATE TRIGGER "BEFORE DROP USER"
6462   ACTIVE BEFORE Drop USER POSITION 0
6463   AS BEGIN END
6464 < ^
6464 > ^
6465 >
6466   CREATE TRIGGER "AFTER DROP USER"
6467   ACTIVE AFTER Drop USER POSITION 0
6468   AS BEGIN END
6469 < ^
6469 > ^
6470 >
6471   CREATE TRIGGER "BEFORE CREATE COLLATION"
6472   ACTIVE BEFORE CREATE COLLATION POSITION 0
6473   AS BEGIN END
6474 < ^
6474 > ^
6475 >
6476   CREATE TRIGGER "AFTER CREATE COLLATION"
6477   ACTIVE AFTER CREATE COLLATION POSITION 0
6478   AS BEGIN END
6479 < ^
6479 > ^
6480 >
6481   CREATE TRIGGER "BEFORE DROP COLLATION"
6482   ACTIVE BEFORE Drop COLLATION POSITION 0
6483   AS BEGIN END
6484 < ^
6484 > ^
6485 >
6486   CREATE TRIGGER "AFTER DROP COLLATION"
6487   ACTIVE AFTER Drop COLLATION POSITION 0
6488   AS BEGIN END
6489 < ^
6489 > ^
6490 >
6491   CREATE TRIGGER "BEFORE ALTER CHARACTER SET"
6492   ACTIVE BEFORE ALTER CHARACTER SET POSITION 0
6493   AS BEGIN END
6494 < ^
6494 > ^
6495 >
6496   CREATE TRIGGER "AFTER ALTER CHARACTER SET"
6497   ACTIVE AFTER ALTER CHARACTER SET POSITION 0
6498   AS BEGIN END
6499 < ^
6499 > ^
6500 >
6501   CREATE TRIGGER "BEFORE CREATE PACKAGE"
6502   ACTIVE BEFORE CREATE PACKAGE POSITION 0
6503   AS BEGIN END
6504 < ^
6504 > ^
6505 >
6506   CREATE TRIGGER "AFTER CREATE PACKAGE"
6507   ACTIVE AFTER CREATE PACKAGE POSITION 0
6508   AS BEGIN END
6509 < ^
6509 > ^
6510 >
6511   CREATE TRIGGER "BEFORE ALTER PACKAGE"
6512   ACTIVE BEFORE ALTER PACKAGE POSITION 0
6513   AS BEGIN END
6514 < ^
6514 > ^
6515 >
6516   CREATE TRIGGER "AFTER ALTER PACKAGE"
6517   ACTIVE AFTER ALTER PACKAGE POSITION 0
6518   AS BEGIN END
6519 < ^
6519 > ^
6520 >
6521   CREATE TRIGGER "BEFORE DROP PACKAGE"
6522   ACTIVE BEFORE Drop PACKAGE POSITION 0
6523   AS BEGIN END
6524 < ^
6524 > ^
6525 >
6526   CREATE TRIGGER "AFTER DROP PACKAGE"
6527   ACTIVE AFTER Drop PACKAGE POSITION 0
6528   AS BEGIN END
6529 < ^
6529 > ^
6530 >
6531   CREATE TRIGGER "BEFORE CREATE PACKAGE BODY"
6532   ACTIVE BEFORE CREATE PACKAGE BODY POSITION 0
6533   AS BEGIN END
6534 < ^
6534 > ^
6535 >
6536   CREATE TRIGGER "AFTER CREATE PACKAGE BODY"
6537   ACTIVE AFTER CREATE PACKAGE BODY POSITION 0
6538   AS BEGIN END
6539 < ^
6539 > ^
6540 >
6541   CREATE TRIGGER "BEFORE DROP PACKAGE BODY"
6542   ACTIVE BEFORE Drop PACKAGE BODY POSITION 0
6543   AS BEGIN END
6544 < ^
6544 > ^
6545 >
6546   CREATE TRIGGER "AFTER DROP PACKAGE BODY"
6547   ACTIVE AFTER Drop PACKAGE BODY POSITION 0
6548   AS BEGIN END
6549 < ^
6549 > ^
6550 >
6551   CREATE TRIGGER "BEFORE ANY DDL STATEMENT"
6552   ACTIVE BEFORE ANY DDL STATEMENT POSITION 0
6553   AS BEGIN END
6554 < ^
6554 > ^
6555 >
6556   CREATE TRIGGER "AFTER ANY DDL STATEMENT"
6557   ACTIVE AFTER ANY DDL STATEMENT POSITION 0
6558   AS BEGIN END
6559 < ^
6559 > ^
6560 >
6561   CREATE TRIGGER SET_CUST_NO FOR CUSTOMER
6562   ACTIVE BEFORE INSERT POSITION 0
6563   AS
# Line 6490 | Line 6565 | BEGIN
6565      if (new.cust_no is null) then
6566      new.cust_no = gen_id(cust_no_gen, 1);
6567   END
6568 < ^
6568 > ^
6569 >
6570   CREATE TRIGGER SET_EMP_NO FOR EMPLOYEE
6571   ACTIVE BEFORE INSERT POSITION 0
6572   AS
# Line 6498 | Line 6574 | BEGIN
6574      if (new.emp_no is null) then
6575      new.emp_no = gen_id(emp_no_gen, 1);
6576   END
6577 < ^
6577 > ^
6578 >
6579   CREATE TRIGGER SAVE_SALARY_CHANGE FOR EMPLOYEE
6580   ACTIVE AFTER UPDATE POSITION 0
6581   AS
# Line 6513 | Line 6590 | BEGIN
6590              old.salary,
6591              (new.salary - old.salary) * 100 / old.salary);
6592   END
6593 < ^
6593 > ^
6594 >
6595   CREATE TRIGGER POST_NEW_ORDER FOR SALES
6596   ACTIVE AFTER INSERT POSITION 0
6597   AS
6598   BEGIN
6599      POST_EVENT 'new_order';
6600   END
6601 < ^
6602 < COMMIT WORK ^
6601 > ^
6602 >
6603 > COMMIT WORK^
6604   SET TERM ;^
6605   COMMIT WORK;
6606   SET AUTODDL OFF;
6607 < SET TERM ^ ;
6607 > SET TERM ^;
6608  
6609   /* Package Definitions */
6610  
6611 < CREATE PACKAGE BODY FB$OUT                                                        
6611 > CREATE PACKAGE BODY FB$OUT
6612   AS
6534
6613   begin
6614          procedure enable
6615          as
# Line 6586 | Line 6664 | begin
6664                  execute procedure clear;
6665          end
6666   end
6667 < ^
6667 > ^
6668  
6669 < CREATE PACKAGE BODY SELECT$TEST                                                    
6669 > CREATE PACKAGE BODY SELECT$TEST
6670   AS
6593
6671   Begin
6672    Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer)
6673    As
# Line 6598 | Line 6675 | Begin
6675      SUSPEND;
6676    End
6677   End
6678 < ^
6678 > ^
6679  
6680 < SET TERM ; ^
6680 > SET TERM ;^
6681   COMMIT WORK;
6682   SET AUTODDL ON;
6683   COMMIT WORK;
6684   SET AUTODDL OFF;
6685 < SET TERM ^ ;
6685 > SET TERM ^;
6686  
6687   /* Stored procedure Bodies */
6688  
6689 <
6613 < ALTER PROCEDURE SHOW_LANGS
6689 > ALTER PROCEDURE SHOW_LANGS
6690   (
6691    CODE VARCHAR(5) CHARACTER SET NONE,
6692    GRADE SMALLINT,
# Line 6631 | Line 6707 | BEGIN
6707             AND (language_req IS NOT NULL))
6708      INTO :languages;
6709      IF (languages = ' ') THEN  /* Prints 'NULL' instead of blanks */
6710 <       languages = 'NULL';        
6710 >       languages = 'NULL';
6711      i = i +1;
6712      SUSPEND;
6713    END
6714   END
6715 < ^
6640 <
6715 > ^
6716  
6717 < ALTER PROCEDURE ADD_EMP_PROJ
6717 > ALTER PROCEDURE ADD_EMP_PROJ
6718   (
6719    EMP_NO SMALLINT,
6720    PROJ_ID CHAR(5) CHARACTER SET NONE
# Line 6652 | Line 6727 | BEGIN
6727                  EXCEPTION unknown_emp_id;
6728          END
6729   END
6730 < ^
6656 <
6730 > ^
6731  
6732 < ALTER PROCEDURE ALL_LANGS
6732 > ALTER PROCEDURE ALL_LANGS
6733   RETURNS
6734   (
6735    CODE VARCHAR(5) CHARACTER SET NONE,
# Line 6665 | Line 6739 | RETURNS
6739   )
6740   AS
6741   BEGIN
6742 <        FOR SELECT job_code, job_grade, job_country FROM job
6742 >        FOR SELECT job_code, job_grade, job_country FROM job
6743                  INTO :code, :grade, :country
6744  
6745          DO
6746          BEGIN
6747 <            FOR SELECT languages FROM show_langs
6747 >            FOR SELECT languages FROM show_langs
6748                      (:code, :grade, :country) INTO :lang DO
6749                  SUSPEND;
6750              /* Put nice separators between rows */
# Line 6681 | Line 6755 | BEGIN
6755              SUSPEND;
6756          END
6757      END
6758 < ^
6685 <
6758 > ^
6759  
6760 < ALTER PROCEDURE DELETE_EMPLOYEE
6760 > ALTER PROCEDURE DELETE_EMPLOYEE
6761   (
6762    EMP_NUM INTEGER
6763   )
# Line 6695 | Line 6768 | BEGIN
6768  
6769          /*
6770           *      If there are any sales records referencing this employee,
6771 <         *      can't delete the employee until the sales are re-assigned
6771 >         *      cannot delete the employee until the sales are re-assigned
6772           *      to another employee or changed to NULL.
6773           */
6774          SELECT count(po_number)
# Line 6741 | Line 6814 | BEGIN
6814          WHERE emp_no = :emp_num;
6815  
6816   END
6817 < ^
6745 <
6817 > ^
6818  
6819 < ALTER PROCEDURE DEPT_BUDGET
6819 > ALTER PROCEDURE DEPT_BUDGET
6820   (
6821    DNO CHAR(3) CHARACTER SET NONE
6822   )
6823   RETURNS
6824   (
6825 <  TOT DECIMAL(12, 2)
6825 >  TOT DECIMAL(12,2)
6826   )
6827   AS
6828 < DECLARE VARIABLE sumb DECIMAL(12, 2);
6828 > DECLARE VARIABLE sumb DECIMAL(12,2);
6829          DECLARE VARIABLE rdno CHAR(3);
6830          DECLARE VARIABLE cnt INTEGER;
6831   BEGIN
# Line 6778 | Line 6850 | BEGIN
6850  
6851          SUSPEND;
6852   END
6853 < ^
6853 > ^
6854  
6855 + ALTER PROCEDURE EMPLOYEE_PAY_STATUS
6856 + (
6857 +  EMP_NUM SMALLINT
6858 + )
6859 + RETURNS
6860 + (
6861 +  PAY_STATUS VARCHAR(6) CHARACTER SET NONE,
6862 +  SALARY NUMERIC(10,2)
6863 + )
6864 + AS
6865 + Declare aCursor CURSOR FOR (
6866 +    Select EMP_NO,SALARY From EMPLOYEE WHERE LAST_NAME = 'unknown');
6867 + BEGIN
6868 +  Select SALARY, Case
6869 +   When SALARY > 10000 and SALARY <= 100000 then 'higher'
6870 +   When SALARY > 100000 then 'gross'
6871 +   else 'lower' End
6872 +  From employee
6873 +    WHERE emp_no = :EMP_NUM
6874 +   into :SALARY, :PAY_STATUS;
6875 + END
6876 + ^
6877  
6878 < ALTER PROCEDURE GET_EMP_PROJ
6878 > ALTER PROCEDURE GET_EMP_PROJ
6879   (
6880    EMP_NO SMALLINT
6881   )
# Line 6798 | Line 6892 | BEGIN
6892          DO
6893                  SUSPEND;
6894   END
6895 < ^
6802 <
6895 > ^
6896  
6897 < ALTER PROCEDURE "Has Space"
6897 > ALTER PROCEDURE "Has Space"
6898   (
6899    ARG1 INTEGER
6900   )
6901   AS
6902   Begin End
6903 < ^
6811 <
6903 > ^
6904  
6905 < ALTER PROCEDURE MAIL_LABEL
6905 > ALTER PROCEDURE MAIL_LABEL
6906   (
6907    CUST_NO INTEGER
6908   )
# Line 6878 | Line 6970 | BEGIN
6970  
6971          SUSPEND;
6972   END
6973 < ^
6882 <
6973 > ^
6974  
6975 < ALTER PROCEDURE ORG_CHART
6975 > ALTER PROCEDURE ORG_CHART
6976   RETURNS
6977   (
6978    HEAD_DEPT CHAR(25) CHARACTER SET NONE,
# Line 6921 | Line 7012 | BEGIN
7012                  SUSPEND;
7013          END
7014   END
7015 < ^
6925 <
7015 > ^
7016  
7017 < ALTER PROCEDURE SHIP_ORDER
7017 > ALTER PROCEDURE SHIP_ORDER
7018   (
7019    PO_NUM CHAR(8) CHARACTER SET NONE
7020   )
# Line 6981 | Line 7071 | BEGIN
7071          WHERE po_number = :po_num;
7072  
7073   END
7074 < ^
6985 <
7074 > ^
7075  
7076 < ALTER PROCEDURE SUB_TOT_BUDGET
7076 > ALTER PROCEDURE SUB_TOT_BUDGET
7077   (
7078    HEAD_DEPT CHAR(3) CHARACTER SET NONE
7079   )
7080   RETURNS
7081   (
7082 <  TOT_BUDGET DECIMAL(12, 2),
7083 <  AVG_BUDGET DECIMAL(12, 2),
7084 <  MIN_BUDGET DECIMAL(12, 2),
7085 <  MAX_BUDGET DECIMAL(12, 2)
7082 >  TOT_BUDGET DECIMAL(12,2),
7083 >  AVG_BUDGET DECIMAL(12,2),
7084 >  MIN_BUDGET DECIMAL(12,2),
7085 >  MAX_BUDGET DECIMAL(12,2)
7086   )
7087   AS
7088   BEGIN
# Line 7003 | Line 7092 | BEGIN
7092                  INTO :tot_budget, :avg_budget, :min_budget, :max_budget;
7093          SUSPEND;
7094   END
7095 < ^
7007 <
7095 > ^
7096  
7097 < ALTER PROCEDURE "UC SPACE"
7097 > ALTER PROCEDURE "UC SPACE"
7098   (
7099    ARG1 INTEGER
7100   )
7101   AS
7102   Begin End
7103 < ^
7016 <
7103 > ^
7104  
7105 < ALTER PROCEDURE "iCASE"
7105 > ALTER PROCEDURE "iCASE"
7106   AS
7107   Begin End
7108 < ^
7108 > ^
7109  
7110 < SET TERM ; ^
7110 > SET TERM ;^
7111   COMMIT WORK;
7112   SET AUTODDL ON;
7113   COMMIT WORK;
7114   SET AUTODDL OFF;
7115 < SET TERM ^ ;
7115 > SET TERM ^;
7116  
7117   /* Stored Function Body */
7118  
7119   ALTER FUNCTION F (X INTEGER)
7120   RETURNS INTEGER
7121 < AS
7121 > AS
7122   BEGIN
7123   RETURN X+1;
7124   END
7125   ^
7126  
7127 <
7041 < SET TERM ; ^
7127 > SET TERM ;^
7128   COMMIT WORK;
7129   SET AUTODDL ON;
7130  
# Line 7115 | Line 7201 | COMMENT ON DATABASE  IS 'Employee Test D
7201   /* Domain definitions */
7202  
7203   CREATE DOMAIN ADDRESSLINE AS VARCHAR(30);
7204 < CREATE DOMAIN BUDGET AS DECIMAL(12, 2)
7204 > CREATE DOMAIN BUDGET AS DECIMAL(12,2)
7205           DEFAULT 50000;
7206   CREATE DOMAIN COUNTRYNAME AS VARCHAR(15);
7207   CREATE DOMAIN CUSTNO AS INTEGER;
# Line 7131 | Line 7217 | CREATE DOMAIN PONUMBER AS CHAR(8);
7217   CREATE DOMAIN PRODTYPE AS VARCHAR(12)
7218           DEFAULT 'software' NOT NULL;
7219   CREATE DOMAIN PROJNO AS CHAR(5);
7220 < CREATE DOMAIN SALARY AS NUMERIC(10, 2)
7220 > CREATE DOMAIN SALARY AS NUMERIC(10,2)
7221           DEFAULT 0;
7222  
7223   /* Table: COUNTRIES, Owner: SYSDBA */
7224  
7225 < CREATE TABLE COUNTRIES
7225 > CREATE TABLE COUNTRIES
7226   (
7227          COUNTRY VARCHAR(64) NOT NULL,
7228          NONEU   SMALLINT,
# Line 7149 | Line 7235 | COMMENT ON COLUMN COUNTRIES.ISO2 IS 'Two
7235  
7236   /* Table: COUNTRY, Owner: SYSDBA */
7237  
7238 < CREATE TABLE COUNTRY
7238 > CREATE TABLE COUNTRY
7239   (
7240          COUNTRY COUNTRYNAME NOT NULL,
7241          CURRENCY        VARCHAR(10) NOT NULL,
# Line 7158 | Line 7244 | PRIMARY KEY (COUNTRY)
7244  
7245   /* Table: CUSTOMER, Owner: SYSDBA */
7246  
7247 < CREATE TABLE CUSTOMER
7247 > CREATE TABLE CUSTOMER
7248   (
7249          CUST_NO CUSTNO NOT NULL,
7250          CUSTOMER        VARCHAR(25) NOT NULL,
# Line 7178 | Line 7264 | PRIMARY KEY (CUST_NO)
7264  
7265   /* Table: DEPARTMENT, Owner: SYSDBA */
7266  
7267 < CREATE TABLE DEPARTMENT
7267 > CREATE TABLE DEPARTMENT
7268   (
7269          DEPT_NO DEPTNO NOT NULL,
7270          DEPARTMENT      VARCHAR(25) NOT NULL,
# Line 7193 | Line 7279 | PRIMARY KEY (DEPT_NO)
7279  
7280   /* Table: EMPLOYEE, Owner: SYSDBA */
7281  
7282 < CREATE TABLE EMPLOYEE
7282 > CREATE TABLE EMPLOYEE
7283   (
7284          EMP_NO  EMPNO NOT NULL,
7285          FIRST_NAME      FIRSTNAME NOT NULL,
# Line 7211 | Line 7297 | PRIMARY KEY (EMP_NO)
7297  
7298   /* Table: EMPLOYEE_PROJECT, Owner: SYSDBA */
7299  
7300 < CREATE TABLE EMPLOYEE_PROJECT
7300 > CREATE TABLE EMPLOYEE_PROJECT
7301   (
7302          EMP_NO  EMPNO NOT NULL,
7303          PROJ_ID PROJNO NOT NULL,
# Line 7220 | Line 7306 | PRIMARY KEY (EMP_NO, PROJ_ID)
7306  
7307   /* Table: FB$OUT_TABLE, Owner: SYSDBA */
7308  
7309 < CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE
7309 > CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE
7310   (
7311          LINE_NUM        INTEGER,
7312          CONTENT FB$OUT_TYPE
# Line 7228 | Line 7314 | CREATE GLOBAL TEMPORARY TABLE FB$OUT_TAB
7314  
7315   /* Table: ITEST, Owner: SYSDBA */
7316  
7317 < CREATE TABLE ITEST
7317 > CREATE TABLE ITEST
7318   (
7319          "KEY"   INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL,
7320          SOMETEXT        VARCHAR(64),
# Line 7237 | Line 7323 | PRIMARY KEY ("KEY")
7323  
7324   /* Table: ITEST2, Owner: SYSDBA */
7325  
7326 < CREATE TABLE ITEST2
7326 > CREATE TABLE ITEST2
7327   (
7328          "KEY"   INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL,
7329          SOMETEXT        VARCHAR(64),
# Line 7246 | Line 7332 | PRIMARY KEY ("KEY")
7332  
7333   /* Table: JOB, Owner: SYSDBA */
7334  
7335 < CREATE TABLE JOB
7335 > CREATE TABLE JOB
7336   (
7337          JOB_CODE        JOBCODE NOT NULL,
7338          JOB_GRADE       JOBGRADE NOT NULL,
# Line 7261 | Line 7347 | PRIMARY KEY (JOB_CODE, JOB_GRADE, JOB_CO
7347  
7348   /* Table: PROJECT, Owner: SYSDBA */
7349  
7350 < CREATE TABLE PROJECT
7350 > CREATE TABLE PROJECT
7351   (
7352          PROJ_ID PROJNO NOT NULL,
7353          PROJ_NAME       VARCHAR(20) NOT NULL,
# Line 7274 | Line 7360 | PRIMARY KEY (PROJ_ID)
7360  
7361   /* Table: PROJ_DEPT_BUDGET, Owner: SYSDBA */
7362  
7363 < CREATE TABLE PROJ_DEPT_BUDGET
7363 > CREATE TABLE PROJ_DEPT_BUDGET
7364   (
7365          FISCAL_YEAR     INTEGER NOT NULL,
7366          PROJ_ID PROJNO NOT NULL,
# Line 7286 | Line 7372 | PRIMARY KEY (FISCAL_YEAR, PROJ_ID, DEPT_
7372  
7373   /* Table: SALARY_HISTORY, Owner: SYSDBA */
7374  
7375 < CREATE TABLE SALARY_HISTORY
7375 > CREATE TABLE SALARY_HISTORY
7376   (
7377          EMP_NO  EMPNO NOT NULL,
7378          CHANGE_DATE     TIMESTAMP DEFAULT 'NOW' NOT NULL,
# Line 7299 | Line 7385 | PRIMARY KEY (EMP_NO, CHANGE_DATE, UPDATE
7385  
7386   /* Table: SALES, Owner: SYSDBA */
7387  
7388 < CREATE TABLE SALES
7388 > CREATE TABLE SALES
7389   (
7390          PO_NUMBER       PONUMBER NOT NULL,
7391          CUST_NO CUSTNO NOT NULL,
# Line 7310 | Line 7396 | CREATE TABLE SALES
7396          DATE_NEEDED     TIMESTAMP,
7397          PAID    CHAR(1) DEFAULT 'n',
7398          QTY_ORDERED     INTEGER DEFAULT 1 NOT NULL,
7399 <        TOTAL_VALUE     DECIMAL(9, 2) NOT NULL,
7399 >        TOTAL_VALUE     DECIMAL(9,2) NOT NULL,
7400          DISCOUNT        FLOAT DEFAULT 0 NOT NULL,
7401          ITEM_TYPE       PRODTYPE,
7402          AGED COMPUTED BY (ship_date - order_date),
# Line 7323 | Line 7409 | DECLARE EXTERNAL FUNCTION ADDDAY
7409   TIMESTAMP, INTEGER
7410   RETURNS TIMESTAMP
7411   ENTRY_POINT 'addDay' MODULE_NAME 'fbudf'
7326
7412   ;
7413  
7414  
7415   DECLARE EXTERNAL FUNCTION I64TRUNCATE
7416 < NUMERIC(18, 0) BY DESCRIPTOR, NUMERIC(18, 0) BY DESCRIPTOR
7416 > NUMERIC(18,0) BY DESCRIPTOR, NUMERIC(18,0) BY DESCRIPTOR
7417   RETURNS PARAMETER 2
7418   ENTRY_POINT 'fbtruncate' MODULE_NAME 'fbudf'
7334
7419   ;
7420  
7421  
# Line 7339 | Line 7423 | DECLARE EXTERNAL FUNCTION TESTIT
7423   TIMESTAMP, INTEGER NULL, CSTRING(10) CHARACTER SET NONE, CSTRING(10) CHARACTER SET NONE BY DESCRIPTOR
7424   RETURNS CSTRING(32) CHARACTER SET NONE FREE_IT
7425   ENTRY_POINT 'testit' MODULE_NAME 'fbudf'
7342
7426   ;
7427  
7428  
# Line 8072 | Line 8155 | ALTER TABLE SALES ADD FOREIGN KEY (CUST_
8155   ALTER TABLE SALES ADD FOREIGN KEY (SALES_REP) REFERENCES EMPLOYEE (EMP_NO);
8156  
8157   CREATE SEQUENCE CUST_NO_GEN;
8158 < ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1015;
8158 > ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1016;
8159   CREATE SEQUENCE EMP_NO_GEN;
8160 < ALTER SEQUENCE EMP_NO_GEN RESTART WITH 157;
8160 > ALTER SEQUENCE EMP_NO_GEN RESTART WITH 158;
8161   CREATE SEQUENCE FB$OUT_SEQ;
8162 < ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 0;
8162 > ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 1;
8163  
8164   /* View: DEPTLIST, Owner: SYSDBA */
8165  
8166   CREATE VIEW DEPTLIST (
8167 <  EMP_NO,
8168 <  FIRST_NAME,
8169 <  LAST_NAME,
8170 <  PHONE_EXT,
8171 <  HIRE_DATE,
8172 <  DEPT_NO,
8173 <  JOB_CODE,
8174 <  JOB_GRADE,
8175 <  JOB_COUNTRY,
8176 <  SALARY,
8177 <  FULL_NAME,
8178 <  DEPT_PATH,
8179 <  DEPT_KEY_PATH
8167 >  EMP_NO,
8168 >  FIRST_NAME,
8169 >  LAST_NAME,
8170 >  PHONE_EXT,
8171 >  HIRE_DATE,
8172 >  DEPT_NO,
8173 >  JOB_CODE,
8174 >  JOB_GRADE,
8175 >  JOB_COUNTRY,
8176 >  SALARY,
8177 >  FULL_NAME,
8178 >  DEPT_PATH,
8179 >  DEPT_KEY_PATH,
8180 >  "Payment Status"
8181   ) AS
8182   with recursive Depts As (
8183   Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT  as VarChar(256)) as DEPT_PATH,
# Line 8107 | Line 8191 | JOIN Depts On D.HEAD_DEPT = Depts.DEPT_N
8191   )
8192  
8193   Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE,
8194 < A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH
8194 > A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH,
8195 > CASE When A.SALARY > 10000 then 'higher paid' else 'lower paid' End
8196   From EMPLOYEE A
8197   JOIN Depts D On D.DEPT_NO = A.DEPT_NO
8198   ;
# Line 8115 | Line 8200 | JOIN Depts D On D.DEPT_NO = A.DEPT_NO
8200   /* View: PHONE_LIST, Owner: SYSDBA */
8201  
8202   CREATE VIEW PHONE_LIST (
8203 <  EMP_NO,
8204 <  FIRST_NAME,
8205 <  LAST_NAME,
8206 <  PHONE_EXT,
8207 <  LOCATION,
8203 >  EMP_NO,
8204 >  FIRST_NAME,
8205 >  LAST_NAME,
8206 >  PHONE_EXT,
8207 >  LOCATION,
8208    PHONE_NO
8209   ) AS
8210   SELECT
# Line 8221 | Line 8306 | CREATE EXCEPTION REASSIGN_SALES 'Reassig
8306   CREATE EXCEPTION UNKNOWN_EMP_ID 'Invalid employee number or project id.';
8307   COMMIT WORK;
8308   SET AUTODDL OFF;
8309 < SET TERM ^ ;
8309 > SET TERM ^;
8310  
8311   /* Package Definitions */
8312  
8313 < CREATE PACKAGE FB$OUT                                                        
8313 > CREATE PACKAGE FB$OUT
8314   AS
8230
8315   begin
8316          procedure enable;
8317          procedure disable;
# Line 8237 | Line 8321 | begin
8321  
8322          procedure get_lines returns (lines fb$out_type);
8323   end
8324 < ^
8324 > ^
8325  
8326 < CREATE PACKAGE SELECT$TEST                                                    
8326 > CREATE PACKAGE SELECT$TEST
8327   AS
8244
8328   Begin
8329    Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer);
8330   End
8331 < ^
8331 > ^
8332  
8333 < SET TERM ; ^
8333 > SET TERM ;^
8334   COMMIT WORK;
8335   SET AUTODDL ON;
8336   COMMIT WORK;
8337   SET AUTODDL OFF;
8338 < SET TERM ^ ;
8338 > SET TERM ^;
8339  
8340   /* Stored procedures Definitions*/
8341  
8342 < CREATE PROCEDURE SHOW_LANGS
8342 > CREATE PROCEDURE SHOW_LANGS
8343   (
8344    CODE VARCHAR(5) CHARACTER SET NONE,
8345    GRADE SMALLINT,
# Line 8268 | Line 8351 | RETURNS
8351   )
8352   AS
8353   BEGIN SUSPEND; EXIT; END
8271
8354   ^
8355  
8356 < CREATE PROCEDURE ADD_EMP_PROJ
8356 > CREATE PROCEDURE ADD_EMP_PROJ
8357   (
8358    EMP_NO SMALLINT,
8359    PROJ_ID CHAR(5) CHARACTER SET NONE
8360   )
8361   AS
8362   BEGIN EXIT; END
8281
8363   ^
8364  
8365 < CREATE PROCEDURE ALL_LANGS
8365 > CREATE PROCEDURE ALL_LANGS
8366   RETURNS
8367   (
8368    CODE VARCHAR(5) CHARACTER SET NONE,
# Line 8291 | Line 8372 | RETURNS
8372   )
8373   AS
8374   BEGIN SUSPEND; EXIT; END
8294
8375   ^
8376  
8377 < CREATE PROCEDURE DELETE_EMPLOYEE
8377 > CREATE PROCEDURE DELETE_EMPLOYEE
8378   (
8379    EMP_NUM INTEGER
8380   )
8381   AS
8382   BEGIN EXIT; END
8303
8383   ^
8384  
8385 < CREATE PROCEDURE DEPT_BUDGET
8385 > CREATE PROCEDURE DEPT_BUDGET
8386   (
8387    DNO CHAR(3) CHARACTER SET NONE
8388   )
8389   RETURNS
8390   (
8391 <  TOT DECIMAL(12, 2)
8391 >  TOT DECIMAL(12,2)
8392   )
8393   AS
8394   BEGIN SUSPEND; EXIT; END
8395 + ^
8396  
8397 + CREATE PROCEDURE EMPLOYEE_PAY_STATUS
8398 + (
8399 +  EMP_NUM SMALLINT
8400 + )
8401 + RETURNS
8402 + (
8403 +  PAY_STATUS VARCHAR(6) CHARACTER SET NONE,
8404 +  SALARY NUMERIC(10,2)
8405 + )
8406 + AS
8407 + BEGIN EXIT; END
8408   ^
8409  
8410 < CREATE PROCEDURE GET_EMP_PROJ
8410 > CREATE PROCEDURE GET_EMP_PROJ
8411   (
8412    EMP_NO SMALLINT
8413   )
# Line 8326 | Line 8417 | RETURNS
8417   )
8418   AS
8419   BEGIN SUSPEND; EXIT; END
8329
8420   ^
8421  
8422 < CREATE PROCEDURE "Has Space"
8422 > CREATE PROCEDURE "Has Space"
8423   (
8424    ARG1 INTEGER
8425   )
8426   AS
8427   BEGIN EXIT; END
8338
8428   ^
8429  
8430 < CREATE PROCEDURE MAIL_LABEL
8430 > CREATE PROCEDURE MAIL_LABEL
8431   (
8432    CUST_NO INTEGER
8433   )
# Line 8353 | Line 8442 | RETURNS
8442   )
8443   AS
8444   BEGIN SUSPEND; EXIT; END
8356
8445   ^
8446  
8447 < CREATE PROCEDURE ORG_CHART
8447 > CREATE PROCEDURE ORG_CHART
8448   RETURNS
8449   (
8450    HEAD_DEPT CHAR(25) CHARACTER SET NONE,
# Line 8367 | Line 8455 | RETURNS
8455   )
8456   AS
8457   BEGIN SUSPEND; EXIT; END
8370
8458   ^
8459  
8460 < CREATE PROCEDURE SHIP_ORDER
8460 > CREATE PROCEDURE SHIP_ORDER
8461   (
8462    PO_NUM CHAR(8) CHARACTER SET NONE
8463   )
8464   AS
8465   BEGIN EXIT; END
8379
8466   ^
8467  
8468 < CREATE PROCEDURE SUB_TOT_BUDGET
8468 > CREATE PROCEDURE SUB_TOT_BUDGET
8469   (
8470    HEAD_DEPT CHAR(3) CHARACTER SET NONE
8471   )
8472   RETURNS
8473   (
8474 <  TOT_BUDGET DECIMAL(12, 2),
8475 <  AVG_BUDGET DECIMAL(12, 2),
8476 <  MIN_BUDGET DECIMAL(12, 2),
8477 <  MAX_BUDGET DECIMAL(12, 2)
8474 >  TOT_BUDGET DECIMAL(12,2),
8475 >  AVG_BUDGET DECIMAL(12,2),
8476 >  MIN_BUDGET DECIMAL(12,2),
8477 >  MAX_BUDGET DECIMAL(12,2)
8478   )
8479   AS
8480   BEGIN SUSPEND; EXIT; END
8395
8481   ^
8482  
8483 < CREATE PROCEDURE "UC SPACE"
8483 > CREATE PROCEDURE "UC SPACE"
8484   (
8485    ARG1 INTEGER
8486   )
8487   AS
8488   BEGIN EXIT; END
8404
8489   ^
8490  
8491 < CREATE PROCEDURE "iCASE"
8491 > CREATE PROCEDURE "iCASE"
8492   AS
8493   BEGIN EXIT; END
8410
8494   ^
8495  
8496 < SET TERM ; ^
8496 > SET TERM ;^
8497   COMMIT WORK;
8498   SET AUTODDL ON;
8499   COMMIT WORK;
8500   SET AUTODDL OFF;
8501 < SET TERM ^ ;
8501 > SET TERM ^;
8502  
8503   /* Stored Function declarations */
8504  
8505   CREATE FUNCTION F (X INTEGER)
8506   RETURNS INTEGER
8507   AS BEGIN END
8425
8508   ^
8509  
8510 <
8429 < SET TERM ; ^
8510 > SET TERM ;^
8511   COMMIT WORK;
8512   SET AUTODDL ON;
8513 < SET TERM ^ ;
8513 > SET TERM ^;
8514  
8515  
8516   /* Triggers only will work for SQL triggers */
# Line 8439 | Line 8520 | ACTIVE ON CONNECT POSITION 0
8520   as
8521   begin
8522   End
8523 < ^
8523 > ^
8524 >
8525   CREATE TRIGGER "BEFORE CREATE TABLE"
8526   ACTIVE BEFORE CREATE TABLE POSITION 0
8527   AS BEGIN END
8528 < ^
8528 > ^
8529 >
8530   CREATE TRIGGER "AFTER CREATE TABLE"
8531   ACTIVE AFTER CREATE TABLE POSITION 0
8532   AS BEGIN END
8533 < ^
8533 > ^
8534 >
8535   CREATE TRIGGER "BEFORE ALTER TABLE"
8536   ACTIVE BEFORE ALTER TABLE POSITION 0
8537   AS BEGIN END
8538 < ^
8538 > ^
8539 >
8540   CREATE TRIGGER "AFTER ALTER TABLE"
8541   ACTIVE AFTER ALTER TABLE POSITION 0
8542   AS BEGIN END
8543 < ^
8543 > ^
8544 >
8545   CREATE TRIGGER "AFTER CREATE/Alter TABLE"
8546   ACTIVE AFTER CREATE TABLE OR ALTER TABLE POSITION 0
8547   AS BEGIN END
8548 < ^
8548 > ^
8549 >
8550   CREATE TRIGGER "BEFORE DROP TABLE"
8551   ACTIVE BEFORE Drop TABLE POSITION 0
8552   AS BEGIN END
8553 < ^
8553 > ^
8554 >
8555   CREATE TRIGGER "AFTER DROP TABLE"
8556   ACTIVE AFTER Drop TABLE POSITION 0
8557   AS BEGIN END
8558 < ^
8558 > ^
8559 >
8560   CREATE TRIGGER "BEFORE CREATE PROCEDURE"
8561   ACTIVE BEFORE CREATE PROCEDURE POSITION 0
8562   AS BEGIN END
8563 < ^
8563 > ^
8564 >
8565   CREATE TRIGGER "AFTER CREATE PROCEDURE"
8566   ACTIVE AFTER CREATE PROCEDURE POSITION 0
8567   AS BEGIN END
8568 < ^
8568 > ^
8569 >
8570   CREATE TRIGGER "BEFORE ALTER PROCEDURE"
8571   ACTIVE BEFORE ALTER PROCEDURE POSITION 0
8572   AS BEGIN END
8573 < ^
8573 > ^
8574 >
8575   CREATE TRIGGER "AFTER ALTER PROCEDURE"
8576   ACTIVE AFTER ALTER PROCEDURE POSITION 0
8577   AS BEGIN END
8578 < ^
8578 > ^
8579 >
8580   CREATE TRIGGER "BEFORE DROP PROCEDURE"
8581   ACTIVE BEFORE Drop PROCEDURE POSITION 0
8582   AS BEGIN END
8583 < ^
8583 > ^
8584 >
8585   CREATE TRIGGER "AFTER DROP PROCEDURE"
8586   ACTIVE AFTER Drop PROCEDURE POSITION 0
8587   AS BEGIN END
8588 < ^
8588 > ^
8589 >
8590   CREATE TRIGGER "BEFORE CREATE FUNCTION"
8591   ACTIVE BEFORE CREATE FUNCTION POSITION 0
8592   AS BEGIN END
8593 < ^
8593 > ^
8594 >
8595   CREATE TRIGGER "AFTER CREATE FUNCTION"
8596   ACTIVE AFTER CREATE FUNCTION POSITION 0
8597   AS BEGIN END
8598 < ^
8598 > ^
8599 >
8600   CREATE TRIGGER "BEFORE ALTER FUNCTION"
8601   ACTIVE BEFORE ALTER FUNCTION POSITION 0
8602   AS BEGIN END
8603 < ^
8603 > ^
8604 >
8605   CREATE TRIGGER "AFTER ALTER FUNCTION"
8606   ACTIVE AFTER ALTER FUNCTION POSITION 0
8607   AS BEGIN END
8608 < ^
8608 > ^
8609 >
8610   CREATE TRIGGER "BEFORE DROP FUNCTION"
8611   ACTIVE BEFORE Drop FUNCTION POSITION 0
8612   AS BEGIN END
8613 < ^
8613 > ^
8614 >
8615   CREATE TRIGGER "AFTER DROP FUNCTION"
8616   ACTIVE AFTER Drop FUNCTION POSITION 0
8617   AS BEGIN END
8618 < ^
8618 > ^
8619 >
8620   CREATE TRIGGER "BEFORE CREATE TRIGGER"
8621   ACTIVE BEFORE CREATE TRIGGER POSITION 0
8622   AS BEGIN END
8623 < ^
8623 > ^
8624 >
8625   CREATE TRIGGER "AFTER CREATE TRIGGER"
8626   ACTIVE AFTER CREATE TRIGGER POSITION 0
8627   AS BEGIN END
8628 < ^
8628 > ^
8629 >
8630   CREATE TRIGGER "BEFORE ALTER TRIGGER"
8631   ACTIVE BEFORE ALTER TRIGGER POSITION 0
8632   AS BEGIN END
8633 < ^
8633 > ^
8634 >
8635   CREATE TRIGGER "AFTER ALTER TRIGGER"
8636   ACTIVE AFTER ALTER TRIGGER POSITION 0
8637   AS BEGIN END
8638 < ^
8638 > ^
8639 >
8640   CREATE TRIGGER "BEFORE DROP TRIGGER"
8641   ACTIVE BEFORE Drop TRIGGER POSITION 0
8642   AS BEGIN END
8643 < ^
8643 > ^
8644 >
8645   CREATE TRIGGER "AFTER DROP TRIGGER"
8646   ACTIVE AFTER Drop TRIGGER POSITION 0
8647   AS BEGIN END
8648 < ^
8648 > ^
8649 >
8650   CREATE TRIGGER "BEFORE CREATE EXCEPTION"
8651   ACTIVE BEFORE CREATE EXCEPTION POSITION 0
8652   AS BEGIN END
8653 < ^
8653 > ^
8654 >
8655   CREATE TRIGGER "AFTER CREATE EXCEPTION"
8656   ACTIVE AFTER CREATE EXCEPTION POSITION 0
8657   AS BEGIN END
8658 < ^
8658 > ^
8659 >
8660   CREATE TRIGGER "BEFORE ALTER EXCEPTION"
8661   ACTIVE BEFORE ALTER EXCEPTION POSITION 0
8662   AS BEGIN END
8663 < ^
8663 > ^
8664 >
8665   CREATE TRIGGER "AFTER ALTER EXCEPTION"
8666   ACTIVE AFTER ALTER EXCEPTION POSITION 0
8667   AS BEGIN END
8668 < ^
8668 > ^
8669 >
8670   CREATE TRIGGER "BEFORE DROP EXCEPTION"
8671   ACTIVE BEFORE Drop EXCEPTION POSITION 0
8672   AS BEGIN END
8673 < ^
8673 > ^
8674 >
8675   CREATE TRIGGER "AFTER DROP EXCEPTION"
8676   ACTIVE AFTER Drop EXCEPTION POSITION 0
8677   AS BEGIN END
8678 < ^
8678 > ^
8679 >
8680   CREATE TRIGGER "BEFORE CREATE VIEW"
8681   ACTIVE BEFORE CREATE VIEW POSITION 0
8682   AS BEGIN END
8683 < ^
8683 > ^
8684 >
8685   CREATE TRIGGER "AFTER CREATE VIEW"
8686   ACTIVE AFTER CREATE VIEW POSITION 0
8687   AS BEGIN END
8688 < ^
8688 > ^
8689 >
8690   CREATE TRIGGER "BEFORE ALTER VIEW"
8691   ACTIVE BEFORE ALTER VIEW POSITION 0
8692   AS BEGIN END
8693 < ^
8693 > ^
8694 >
8695   CREATE TRIGGER "AFTER ALTER VIEW"
8696   ACTIVE AFTER ALTER VIEW POSITION 0
8697   AS BEGIN END
8698 < ^
8698 > ^
8699 >
8700   CREATE TRIGGER "BEFORE DROP VIEW"
8701   ACTIVE BEFORE Drop VIEW POSITION 0
8702   AS BEGIN END
8703 < ^
8703 > ^
8704 >
8705   CREATE TRIGGER "AFTER DROP VIEW"
8706   ACTIVE AFTER Drop VIEW POSITION 0
8707   AS BEGIN END
8708 < ^
8708 > ^
8709 >
8710   CREATE TRIGGER "BEFORE CREATE DOMAIN"
8711   ACTIVE BEFORE CREATE DOMAIN POSITION 0
8712   AS BEGIN END
8713 < ^
8713 > ^
8714 >
8715   CREATE TRIGGER "AFTER CREATE DOMAIN"
8716   ACTIVE AFTER CREATE DOMAIN POSITION 0
8717   AS BEGIN END
8718 < ^
8718 > ^
8719 >
8720   CREATE TRIGGER "BEFORE ALTER DOMAIN"
8721   ACTIVE BEFORE ALTER DOMAIN POSITION 0
8722   AS BEGIN END
8723 < ^
8723 > ^
8724 >
8725   CREATE TRIGGER "AFTER ALTER DOMAIN"
8726   ACTIVE AFTER ALTER DOMAIN POSITION 0
8727   AS BEGIN END
8728 < ^
8728 > ^
8729 >
8730   CREATE TRIGGER "BEFORE DROP DOMAIN"
8731   ACTIVE BEFORE Drop DOMAIN POSITION 0
8732   AS BEGIN END
8733 < ^
8733 > ^
8734 >
8735   CREATE TRIGGER "AFTER DROP DOMAIN"
8736   ACTIVE AFTER Drop DOMAIN POSITION 0
8737   AS BEGIN END
8738 < ^
8738 > ^
8739 >
8740   CREATE TRIGGER "BEFORE CREATE ROLE"
8741   ACTIVE BEFORE CREATE ROLE POSITION 0
8742   AS BEGIN END
8743 < ^
8743 > ^
8744 >
8745   CREATE TRIGGER "AFTER CREATE ROLE"
8746   ACTIVE AFTER CREATE ROLE POSITION 0
8747   AS BEGIN END
8748 < ^
8748 > ^
8749 >
8750   CREATE TRIGGER "BEFORE ALTER ROLE"
8751   ACTIVE BEFORE ALTER ROLE POSITION 0
8752   AS BEGIN END
8753 < ^
8753 > ^
8754 >
8755   CREATE TRIGGER "AFTER ALTER ROLE"
8756   ACTIVE AFTER ALTER ROLE POSITION 0
8757   AS BEGIN END
8758 < ^
8758 > ^
8759 >
8760   CREATE TRIGGER "BEFORE DROP ROLE"
8761   ACTIVE BEFORE Drop ROLE POSITION 0
8762   AS BEGIN END
8763 < ^
8763 > ^
8764 >
8765   CREATE TRIGGER "AFTER DROP ROLE"
8766   ACTIVE AFTER Drop ROLE POSITION 0
8767   AS BEGIN END
8768 < ^
8768 > ^
8769 >
8770   CREATE TRIGGER "BEFORE CREATE INDEX"
8771   ACTIVE BEFORE CREATE INDEX POSITION 0
8772   AS BEGIN END
8773 < ^
8773 > ^
8774 >
8775   CREATE TRIGGER "AFTER CREATE INDEX"
8776   ACTIVE AFTER CREATE INDEX POSITION 0
8777   AS BEGIN END
8778 < ^
8778 > ^
8779 >
8780   CREATE TRIGGER "BEFORE ALTER INDEX"
8781   ACTIVE BEFORE ALTER INDEX POSITION 0
8782   AS BEGIN END
8783 < ^
8783 > ^
8784 >
8785   CREATE TRIGGER "AFTER ALTER INDEX"
8786   ACTIVE AFTER ALTER INDEX POSITION 0
8787   AS BEGIN END
8788 < ^
8788 > ^
8789 >
8790   CREATE TRIGGER "BEFORE DROP INDEX"
8791   ACTIVE BEFORE Drop INDEX POSITION 0
8792   AS BEGIN END
8793 < ^
8793 > ^
8794 >
8795   CREATE TRIGGER "AFTER DROP INDEX"
8796   ACTIVE AFTER Drop INDEX POSITION 0
8797   AS BEGIN END
8798 < ^
8798 > ^
8799 >
8800   CREATE TRIGGER "BEFORE CREATE SEQUENCE"
8801   ACTIVE BEFORE CREATE SEQUENCE POSITION 0
8802   AS BEGIN END
8803 < ^
8803 > ^
8804 >
8805   CREATE TRIGGER "AFTER CREATE SEQUENCE"
8806   ACTIVE AFTER CREATE SEQUENCE POSITION 0
8807   AS BEGIN END
8808 < ^
8808 > ^
8809 >
8810   CREATE TRIGGER "BEFORE ALTER SEQUENCE"
8811   ACTIVE BEFORE ALTER SEQUENCE POSITION 0
8812   AS BEGIN END
8813 < ^
8813 > ^
8814 >
8815   CREATE TRIGGER "AFTER ALTER SEQUENCE"
8816   ACTIVE AFTER ALTER SEQUENCE POSITION 0
8817   AS BEGIN END
8818 < ^
8818 > ^
8819 >
8820   CREATE TRIGGER "BEFORE DROP SEQUENCE"
8821   ACTIVE BEFORE Drop SEQUENCE POSITION 0
8822   AS BEGIN END
8823 < ^
8823 > ^
8824 >
8825   CREATE TRIGGER "AFTER DROP SEQUENCE"
8826   ACTIVE AFTER Drop SEQUENCE POSITION 0
8827   AS BEGIN END
8828 < ^
8828 > ^
8829 >
8830   CREATE TRIGGER "BEFORE CREATE USER"
8831   ACTIVE BEFORE CREATE USER POSITION 0
8832   AS BEGIN END
8833 < ^
8833 > ^
8834 >
8835   CREATE TRIGGER "AFTER CREATE USER"
8836   ACTIVE AFTER CREATE USER POSITION 0
8837   AS BEGIN END
8838 < ^
8838 > ^
8839 >
8840   CREATE TRIGGER "BEFORE ALTER USER"
8841   ACTIVE BEFORE ALTER USER POSITION 0
8842   AS BEGIN END
8843 < ^
8843 > ^
8844 >
8845   CREATE TRIGGER "AFTER ALTER USER"
8846   ACTIVE AFTER ALTER USER POSITION 0
8847   AS BEGIN END
8848 < ^
8848 > ^
8849 >
8850   CREATE TRIGGER "BEFORE DROP USER"
8851   ACTIVE BEFORE Drop USER POSITION 0
8852   AS BEGIN END
8853 < ^
8853 > ^
8854 >
8855   CREATE TRIGGER "AFTER DROP USER"
8856   ACTIVE AFTER Drop USER POSITION 0
8857   AS BEGIN END
8858 < ^
8858 > ^
8859 >
8860   CREATE TRIGGER "BEFORE CREATE COLLATION"
8861   ACTIVE BEFORE CREATE COLLATION POSITION 0
8862   AS BEGIN END
8863 < ^
8863 > ^
8864 >
8865   CREATE TRIGGER "AFTER CREATE COLLATION"
8866   ACTIVE AFTER CREATE COLLATION POSITION 0
8867   AS BEGIN END
8868 < ^
8868 > ^
8869 >
8870   CREATE TRIGGER "BEFORE DROP COLLATION"
8871   ACTIVE BEFORE Drop COLLATION POSITION 0
8872   AS BEGIN END
8873 < ^
8873 > ^
8874 >
8875   CREATE TRIGGER "AFTER DROP COLLATION"
8876   ACTIVE AFTER Drop COLLATION POSITION 0
8877   AS BEGIN END
8878 < ^
8878 > ^
8879 >
8880   CREATE TRIGGER "BEFORE ALTER CHARACTER SET"
8881   ACTIVE BEFORE ALTER CHARACTER SET POSITION 0
8882   AS BEGIN END
8883 < ^
8883 > ^
8884 >
8885   CREATE TRIGGER "AFTER ALTER CHARACTER SET"
8886   ACTIVE AFTER ALTER CHARACTER SET POSITION 0
8887   AS BEGIN END
8888 < ^
8888 > ^
8889 >
8890   CREATE TRIGGER "BEFORE CREATE PACKAGE"
8891   ACTIVE BEFORE CREATE PACKAGE POSITION 0
8892   AS BEGIN END
8893 < ^
8893 > ^
8894 >
8895   CREATE TRIGGER "AFTER CREATE PACKAGE"
8896   ACTIVE AFTER CREATE PACKAGE POSITION 0
8897   AS BEGIN END
8898 < ^
8898 > ^
8899 >
8900   CREATE TRIGGER "BEFORE ALTER PACKAGE"
8901   ACTIVE BEFORE ALTER PACKAGE POSITION 0
8902   AS BEGIN END
8903 < ^
8903 > ^
8904 >
8905   CREATE TRIGGER "AFTER ALTER PACKAGE"
8906   ACTIVE AFTER ALTER PACKAGE POSITION 0
8907   AS BEGIN END
8908 < ^
8908 > ^
8909 >
8910   CREATE TRIGGER "BEFORE DROP PACKAGE"
8911   ACTIVE BEFORE Drop PACKAGE POSITION 0
8912   AS BEGIN END
8913 < ^
8913 > ^
8914 >
8915   CREATE TRIGGER "AFTER DROP PACKAGE"
8916   ACTIVE AFTER Drop PACKAGE POSITION 0
8917   AS BEGIN END
8918 < ^
8918 > ^
8919 >
8920   CREATE TRIGGER "BEFORE CREATE PACKAGE BODY"
8921   ACTIVE BEFORE CREATE PACKAGE BODY POSITION 0
8922   AS BEGIN END
8923 < ^
8923 > ^
8924 >
8925   CREATE TRIGGER "AFTER CREATE PACKAGE BODY"
8926   ACTIVE AFTER CREATE PACKAGE BODY POSITION 0
8927   AS BEGIN END
8928 < ^
8928 > ^
8929 >
8930   CREATE TRIGGER "BEFORE DROP PACKAGE BODY"
8931   ACTIVE BEFORE Drop PACKAGE BODY POSITION 0
8932   AS BEGIN END
8933 < ^
8933 > ^
8934 >
8935   CREATE TRIGGER "AFTER DROP PACKAGE BODY"
8936   ACTIVE AFTER Drop PACKAGE BODY POSITION 0
8937   AS BEGIN END
8938 < ^
8938 > ^
8939 >
8940   CREATE TRIGGER "BEFORE ANY DDL STATEMENT"
8941   ACTIVE BEFORE ANY DDL STATEMENT POSITION 0
8942   AS BEGIN END
8943 < ^
8943 > ^
8944 >
8945   CREATE TRIGGER "AFTER ANY DDL STATEMENT"
8946   ACTIVE AFTER ANY DDL STATEMENT POSITION 0
8947   AS BEGIN END
8948 < ^
8948 > ^
8949 >
8950   CREATE TRIGGER SET_CUST_NO FOR CUSTOMER
8951   ACTIVE BEFORE INSERT POSITION 0
8952   AS
# Line 8787 | Line 8954 | BEGIN
8954      if (new.cust_no is null) then
8955      new.cust_no = gen_id(cust_no_gen, 1);
8956   END
8957 < ^
8957 > ^
8958 >
8959   CREATE TRIGGER SET_EMP_NO FOR EMPLOYEE
8960   ACTIVE BEFORE INSERT POSITION 0
8961   AS
# Line 8795 | Line 8963 | BEGIN
8963      if (new.emp_no is null) then
8964      new.emp_no = gen_id(emp_no_gen, 1);
8965   END
8966 < ^
8966 > ^
8967 >
8968   CREATE TRIGGER SAVE_SALARY_CHANGE FOR EMPLOYEE
8969   ACTIVE AFTER UPDATE POSITION 0
8970   AS
# Line 8810 | Line 8979 | BEGIN
8979              old.salary,
8980              (new.salary - old.salary) * 100 / old.salary);
8981   END
8982 < ^
8982 > ^
8983 >
8984   CREATE TRIGGER POST_NEW_ORDER FOR SALES
8985   ACTIVE AFTER INSERT POSITION 0
8986   AS
8987   BEGIN
8988      POST_EVENT 'new_order';
8989   END
8990 < ^
8991 < COMMIT WORK ^
8990 > ^
8991 >
8992 > COMMIT WORK^
8993   SET TERM ;^
8994   COMMIT WORK;
8995   SET AUTODDL OFF;
8996 < SET TERM ^ ;
8996 > SET TERM ^;
8997  
8998   /* Package Definitions */
8999  
9000 < CREATE PACKAGE BODY FB$OUT                                                        
9000 > CREATE PACKAGE BODY FB$OUT
9001   AS
8831
9002   begin
9003          procedure enable
9004          as
# Line 8883 | Line 9053 | begin
9053                  execute procedure clear;
9054          end
9055   end
9056 < ^
9056 > ^
9057  
9058 < CREATE PACKAGE BODY SELECT$TEST                                                    
9058 > CREATE PACKAGE BODY SELECT$TEST
9059   AS
8890
9060   Begin
9061    Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer)
9062    As
# Line 8895 | Line 9064 | Begin
9064      SUSPEND;
9065    End
9066   End
9067 < ^
9067 > ^
9068  
9069 < SET TERM ; ^
9069 > SET TERM ;^
9070   COMMIT WORK;
9071   SET AUTODDL ON;
9072   COMMIT WORK;
9073   SET AUTODDL OFF;
9074 < SET TERM ^ ;
9074 > SET TERM ^;
9075  
9076   /* Stored procedure Bodies */
9077  
9078 <
8910 < ALTER PROCEDURE SHOW_LANGS
9078 > ALTER PROCEDURE SHOW_LANGS
9079   (
9080    CODE VARCHAR(5) CHARACTER SET NONE,
9081    GRADE SMALLINT,
# Line 8928 | Line 9096 | BEGIN
9096             AND (language_req IS NOT NULL))
9097      INTO :languages;
9098      IF (languages = ' ') THEN  /* Prints 'NULL' instead of blanks */
9099 <       languages = 'NULL';        
9099 >       languages = 'NULL';
9100      i = i +1;
9101      SUSPEND;
9102    END
9103   END
9104 < ^
8937 <
9104 > ^
9105  
9106 < ALTER PROCEDURE ADD_EMP_PROJ
9106 > ALTER PROCEDURE ADD_EMP_PROJ
9107   (
9108    EMP_NO SMALLINT,
9109    PROJ_ID CHAR(5) CHARACTER SET NONE
# Line 8949 | Line 9116 | BEGIN
9116                  EXCEPTION unknown_emp_id;
9117          END
9118   END
9119 < ^
8953 <
9119 > ^
9120  
9121 < ALTER PROCEDURE ALL_LANGS
9121 > ALTER PROCEDURE ALL_LANGS
9122   RETURNS
9123   (
9124    CODE VARCHAR(5) CHARACTER SET NONE,
# Line 8962 | Line 9128 | RETURNS
9128   )
9129   AS
9130   BEGIN
9131 <        FOR SELECT job_code, job_grade, job_country FROM job
9131 >        FOR SELECT job_code, job_grade, job_country FROM job
9132                  INTO :code, :grade, :country
9133  
9134          DO
9135          BEGIN
9136 <            FOR SELECT languages FROM show_langs
9136 >            FOR SELECT languages FROM show_langs
9137                      (:code, :grade, :country) INTO :lang DO
9138                  SUSPEND;
9139              /* Put nice separators between rows */
# Line 8978 | Line 9144 | BEGIN
9144              SUSPEND;
9145          END
9146      END
9147 < ^
8982 <
9147 > ^
9148  
9149 < ALTER PROCEDURE DELETE_EMPLOYEE
9149 > ALTER PROCEDURE DELETE_EMPLOYEE
9150   (
9151    EMP_NUM INTEGER
9152   )
# Line 8992 | Line 9157 | BEGIN
9157  
9158          /*
9159           *      If there are any sales records referencing this employee,
9160 <         *      can't delete the employee until the sales are re-assigned
9160 >         *      cannot delete the employee until the sales are re-assigned
9161           *      to another employee or changed to NULL.
9162           */
9163          SELECT count(po_number)
# Line 9038 | Line 9203 | BEGIN
9203          WHERE emp_no = :emp_num;
9204  
9205   END
9206 < ^
9042 <
9206 > ^
9207  
9208 < ALTER PROCEDURE DEPT_BUDGET
9208 > ALTER PROCEDURE DEPT_BUDGET
9209   (
9210    DNO CHAR(3) CHARACTER SET NONE
9211   )
9212   RETURNS
9213   (
9214 <  TOT DECIMAL(12, 2)
9214 >  TOT DECIMAL(12,2)
9215   )
9216   AS
9217 < DECLARE VARIABLE sumb DECIMAL(12, 2);
9217 > DECLARE VARIABLE sumb DECIMAL(12,2);
9218          DECLARE VARIABLE rdno CHAR(3);
9219          DECLARE VARIABLE cnt INTEGER;
9220   BEGIN
# Line 9075 | Line 9239 | BEGIN
9239  
9240          SUSPEND;
9241   END
9242 < ^
9242 > ^
9243  
9244 + ALTER PROCEDURE EMPLOYEE_PAY_STATUS
9245 + (
9246 +  EMP_NUM SMALLINT
9247 + )
9248 + RETURNS
9249 + (
9250 +  PAY_STATUS VARCHAR(6) CHARACTER SET NONE,
9251 +  SALARY NUMERIC(10,2)
9252 + )
9253 + AS
9254 + Declare aCursor CURSOR FOR (
9255 +    Select EMP_NO,SALARY From EMPLOYEE WHERE LAST_NAME = 'unknown');
9256 + BEGIN
9257 +  Select SALARY, Case
9258 +   When SALARY > 10000 and SALARY <= 100000 then 'higher'
9259 +   When SALARY > 100000 then 'gross'
9260 +   else 'lower' End
9261 +  From employee
9262 +    WHERE emp_no = :EMP_NUM
9263 +   into :SALARY, :PAY_STATUS;
9264 + END
9265 + ^
9266  
9267 < ALTER PROCEDURE GET_EMP_PROJ
9267 > ALTER PROCEDURE GET_EMP_PROJ
9268   (
9269    EMP_NO SMALLINT
9270   )
# Line 9095 | Line 9281 | BEGIN
9281          DO
9282                  SUSPEND;
9283   END
9284 < ^
9099 <
9284 > ^
9285  
9286 < ALTER PROCEDURE "Has Space"
9286 > ALTER PROCEDURE "Has Space"
9287   (
9288    ARG1 INTEGER
9289   )
9290   AS
9291   Begin End
9292 < ^
9108 <
9292 > ^
9293  
9294 < ALTER PROCEDURE MAIL_LABEL
9294 > ALTER PROCEDURE MAIL_LABEL
9295   (
9296    CUST_NO INTEGER
9297   )
# Line 9175 | Line 9359 | BEGIN
9359  
9360          SUSPEND;
9361   END
9362 < ^
9179 <
9362 > ^
9363  
9364 < ALTER PROCEDURE ORG_CHART
9364 > ALTER PROCEDURE ORG_CHART
9365   RETURNS
9366   (
9367    HEAD_DEPT CHAR(25) CHARACTER SET NONE,
# Line 9218 | Line 9401 | BEGIN
9401                  SUSPEND;
9402          END
9403   END
9404 < ^
9222 <
9404 > ^
9405  
9406 < ALTER PROCEDURE SHIP_ORDER
9406 > ALTER PROCEDURE SHIP_ORDER
9407   (
9408    PO_NUM CHAR(8) CHARACTER SET NONE
9409   )
# Line 9278 | Line 9460 | BEGIN
9460          WHERE po_number = :po_num;
9461  
9462   END
9463 < ^
9282 <
9463 > ^
9464  
9465 < ALTER PROCEDURE SUB_TOT_BUDGET
9465 > ALTER PROCEDURE SUB_TOT_BUDGET
9466   (
9467    HEAD_DEPT CHAR(3) CHARACTER SET NONE
9468   )
9469   RETURNS
9470   (
9471 <  TOT_BUDGET DECIMAL(12, 2),
9472 <  AVG_BUDGET DECIMAL(12, 2),
9473 <  MIN_BUDGET DECIMAL(12, 2),
9474 <  MAX_BUDGET DECIMAL(12, 2)
9471 >  TOT_BUDGET DECIMAL(12,2),
9472 >  AVG_BUDGET DECIMAL(12,2),
9473 >  MIN_BUDGET DECIMAL(12,2),
9474 >  MAX_BUDGET DECIMAL(12,2)
9475   )
9476   AS
9477   BEGIN
# Line 9300 | Line 9481 | BEGIN
9481                  INTO :tot_budget, :avg_budget, :min_budget, :max_budget;
9482          SUSPEND;
9483   END
9484 < ^
9304 <
9484 > ^
9485  
9486 < ALTER PROCEDURE "UC SPACE"
9486 > ALTER PROCEDURE "UC SPACE"
9487   (
9488    ARG1 INTEGER
9489   )
9490   AS
9491   Begin End
9492 < ^
9313 <
9492 > ^
9493  
9494 < ALTER PROCEDURE "iCASE"
9494 > ALTER PROCEDURE "iCASE"
9495   AS
9496   Begin End
9497 < ^
9497 > ^
9498  
9499 < SET TERM ; ^
9499 > SET TERM ;^
9500   COMMIT WORK;
9501   SET AUTODDL ON;
9502   COMMIT WORK;
9503   SET AUTODDL OFF;
9504 < SET TERM ^ ;
9504 > SET TERM ^;
9505  
9506   /* Stored Function Body */
9507  
9508   ALTER FUNCTION F (X INTEGER)
9509   RETURNS INTEGER
9510 < AS
9510 > AS
9511   BEGIN
9512   RETURN X+1;
9513   END
9514   ^
9515  
9516 <
9338 < SET TERM ; ^
9516 > SET TERM ;^
9517   COMMIT WORK;
9518   SET AUTODDL ON;
9519  
# Line 9409 | Line 9587 | COMMENT ON DATABASE  IS 'Employee Test D
9587   /* Domain definitions */
9588  
9589   CREATE DOMAIN ADDRESSLINE AS VARCHAR(30);
9590 < CREATE DOMAIN BUDGET AS DECIMAL(12, 2)
9590 > CREATE DOMAIN BUDGET AS DECIMAL(12,2)
9591           DEFAULT 50000;
9592   CREATE DOMAIN COUNTRYNAME AS VARCHAR(15);
9593   CREATE DOMAIN CUSTNO AS INTEGER;
# Line 9425 | Line 9603 | CREATE DOMAIN PONUMBER AS CHAR(8);
9603   CREATE DOMAIN PRODTYPE AS VARCHAR(12)
9604           DEFAULT 'software' NOT NULL;
9605   CREATE DOMAIN PROJNO AS CHAR(5);
9606 < CREATE DOMAIN SALARY AS NUMERIC(10, 2)
9606 > CREATE DOMAIN SALARY AS NUMERIC(10,2)
9607           DEFAULT 0;
9608  
9609   /* Table: COUNTRIES, Owner: SYSDBA */
9610  
9611 < CREATE TABLE COUNTRIES
9611 > CREATE TABLE COUNTRIES
9612   (
9613          COUNTRY VARCHAR(64) NOT NULL,
9614          NONEU   SMALLINT,
# Line 9443 | Line 9621 | COMMENT ON COLUMN COUNTRIES.ISO2 IS 'Two
9621  
9622   /* Table: COUNTRY, Owner: SYSDBA */
9623  
9624 < CREATE TABLE COUNTRY
9624 > CREATE TABLE COUNTRY
9625   (
9626          COUNTRY COUNTRYNAME NOT NULL,
9627          CURRENCY        VARCHAR(10) NOT NULL,
# Line 9452 | Line 9630 | PRIMARY KEY (COUNTRY)
9630  
9631   /* Table: CUSTOMER, Owner: SYSDBA */
9632  
9633 < CREATE TABLE CUSTOMER
9633 > CREATE TABLE CUSTOMER
9634   (
9635          CUST_NO CUSTNO NOT NULL,
9636          CUSTOMER        VARCHAR(25) NOT NULL,
# Line 9472 | Line 9650 | PRIMARY KEY (CUST_NO)
9650  
9651   /* Table: DEPARTMENT, Owner: SYSDBA */
9652  
9653 < CREATE TABLE DEPARTMENT
9653 > CREATE TABLE DEPARTMENT
9654   (
9655          DEPT_NO DEPTNO NOT NULL,
9656          DEPARTMENT      VARCHAR(25) NOT NULL,
# Line 9487 | Line 9665 | PRIMARY KEY (DEPT_NO)
9665  
9666   /* Table: EMPLOYEE, Owner: SYSDBA */
9667  
9668 < CREATE TABLE EMPLOYEE
9668 > CREATE TABLE EMPLOYEE
9669   (
9670          EMP_NO  EMPNO NOT NULL,
9671          FIRST_NAME      FIRSTNAME NOT NULL,
# Line 9505 | Line 9683 | PRIMARY KEY (EMP_NO)
9683  
9684   /* Table: EMPLOYEE_PROJECT, Owner: SYSDBA */
9685  
9686 < CREATE TABLE EMPLOYEE_PROJECT
9686 > CREATE TABLE EMPLOYEE_PROJECT
9687   (
9688          EMP_NO  EMPNO NOT NULL,
9689          PROJ_ID PROJNO NOT NULL,
# Line 9514 | Line 9692 | PRIMARY KEY (EMP_NO, PROJ_ID)
9692  
9693   /* Table: FB$OUT_TABLE, Owner: SYSDBA */
9694  
9695 < CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE
9695 > CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE
9696   (
9697          LINE_NUM        INTEGER,
9698          CONTENT FB$OUT_TYPE
# Line 9522 | Line 9700 | CREATE GLOBAL TEMPORARY TABLE FB$OUT_TAB
9700  
9701   /* Table: ITEST, Owner: SYSDBA */
9702  
9703 < CREATE TABLE ITEST
9703 > CREATE TABLE ITEST
9704   (
9705          "KEY"   INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL,
9706          SOMETEXT        VARCHAR(64),
# Line 9531 | Line 9709 | PRIMARY KEY ("KEY")
9709  
9710   /* Table: ITEST2, Owner: SYSDBA */
9711  
9712 < CREATE TABLE ITEST2
9712 > CREATE TABLE ITEST2
9713   (
9714          "KEY"   INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL,
9715          SOMETEXT        VARCHAR(64),
# Line 9540 | Line 9718 | PRIMARY KEY ("KEY")
9718  
9719   /* Table: JOB, Owner: SYSDBA */
9720  
9721 < CREATE TABLE JOB
9721 > CREATE TABLE JOB
9722   (
9723          JOB_CODE        JOBCODE NOT NULL,
9724          JOB_GRADE       JOBGRADE NOT NULL,
# Line 9555 | Line 9733 | PRIMARY KEY (JOB_CODE, JOB_GRADE, JOB_CO
9733  
9734   /* Table: PROJECT, Owner: SYSDBA */
9735  
9736 < CREATE TABLE PROJECT
9736 > CREATE TABLE PROJECT
9737   (
9738          PROJ_ID PROJNO NOT NULL,
9739          PROJ_NAME       VARCHAR(20) NOT NULL,
# Line 9568 | Line 9746 | PRIMARY KEY (PROJ_ID)
9746  
9747   /* Table: PROJ_DEPT_BUDGET, Owner: SYSDBA */
9748  
9749 < CREATE TABLE PROJ_DEPT_BUDGET
9749 > CREATE TABLE PROJ_DEPT_BUDGET
9750   (
9751          FISCAL_YEAR     INTEGER NOT NULL,
9752          PROJ_ID PROJNO NOT NULL,
# Line 9580 | Line 9758 | PRIMARY KEY (FISCAL_YEAR, PROJ_ID, DEPT_
9758  
9759   /* Table: SALARY_HISTORY, Owner: SYSDBA */
9760  
9761 < CREATE TABLE SALARY_HISTORY
9761 > CREATE TABLE SALARY_HISTORY
9762   (
9763          EMP_NO  EMPNO NOT NULL,
9764          CHANGE_DATE     TIMESTAMP DEFAULT 'NOW' NOT NULL,
# Line 9593 | Line 9771 | PRIMARY KEY (EMP_NO, CHANGE_DATE, UPDATE
9771  
9772   /* Table: SALES, Owner: SYSDBA */
9773  
9774 < CREATE TABLE SALES
9774 > CREATE TABLE SALES
9775   (
9776          PO_NUMBER       PONUMBER NOT NULL,
9777          CUST_NO CUSTNO NOT NULL,
# Line 9604 | Line 9782 | CREATE TABLE SALES
9782          DATE_NEEDED     TIMESTAMP,
9783          PAID    CHAR(1) DEFAULT 'n',
9784          QTY_ORDERED     INTEGER DEFAULT 1 NOT NULL,
9785 <        TOTAL_VALUE     DECIMAL(9, 2) NOT NULL,
9785 >        TOTAL_VALUE     DECIMAL(9,2) NOT NULL,
9786          DISCOUNT        FLOAT DEFAULT 0 NOT NULL,
9787          ITEM_TYPE       PRODTYPE,
9788          AGED COMPUTED BY (ship_date - order_date),
# Line 9617 | Line 9795 | DECLARE EXTERNAL FUNCTION ADDDAY
9795   TIMESTAMP, INTEGER
9796   RETURNS TIMESTAMP
9797   ENTRY_POINT 'addDay' MODULE_NAME 'fbudf'
9620
9798   ;
9799  
9800  
9801   DECLARE EXTERNAL FUNCTION I64TRUNCATE
9802 < NUMERIC(18, 0) BY DESCRIPTOR, NUMERIC(18, 0) BY DESCRIPTOR
9802 > NUMERIC(18,0) BY DESCRIPTOR, NUMERIC(18,0) BY DESCRIPTOR
9803   RETURNS PARAMETER 2
9804   ENTRY_POINT 'fbtruncate' MODULE_NAME 'fbudf'
9628
9805   ;
9806  
9807  
# Line 9633 | Line 9809 | DECLARE EXTERNAL FUNCTION TESTIT
9809   TIMESTAMP, INTEGER NULL, CSTRING(10) CHARACTER SET NONE, CSTRING(10) CHARACTER SET NONE BY DESCRIPTOR
9810   RETURNS CSTRING(32) CHARACTER SET NONE FREE_IT
9811   ENTRY_POINT 'testit' MODULE_NAME 'fbudf'
9636
9812   ;
9813  
9814  
# Line 10366 | Line 10541 | ALTER TABLE SALES ADD FOREIGN KEY (CUST_
10541   ALTER TABLE SALES ADD FOREIGN KEY (SALES_REP) REFERENCES EMPLOYEE (EMP_NO);
10542  
10543   CREATE SEQUENCE CUST_NO_GEN;
10544 < ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1015;
10544 > ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1016;
10545   CREATE SEQUENCE EMP_NO_GEN;
10546 < ALTER SEQUENCE EMP_NO_GEN RESTART WITH 157;
10546 > ALTER SEQUENCE EMP_NO_GEN RESTART WITH 158;
10547   CREATE SEQUENCE FB$OUT_SEQ;
10548 < ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 0;
10548 > ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 1;
10549  
10550   /* View: DEPTLIST, Owner: SYSDBA */
10551  
10552   CREATE VIEW DEPTLIST (
10553 <  EMP_NO,
10554 <  FIRST_NAME,
10555 <  LAST_NAME,
10556 <  PHONE_EXT,
10557 <  HIRE_DATE,
10558 <  DEPT_NO,
10559 <  JOB_CODE,
10560 <  JOB_GRADE,
10561 <  JOB_COUNTRY,
10562 <  SALARY,
10563 <  FULL_NAME,
10564 <  DEPT_PATH,
10565 <  DEPT_KEY_PATH
10553 >  EMP_NO,
10554 >  FIRST_NAME,
10555 >  LAST_NAME,
10556 >  PHONE_EXT,
10557 >  HIRE_DATE,
10558 >  DEPT_NO,
10559 >  JOB_CODE,
10560 >  JOB_GRADE,
10561 >  JOB_COUNTRY,
10562 >  SALARY,
10563 >  FULL_NAME,
10564 >  DEPT_PATH,
10565 >  DEPT_KEY_PATH,
10566 >  "Payment Status"
10567   ) AS
10568   with recursive Depts As (
10569   Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT  as VarChar(256)) as DEPT_PATH,
# Line 10401 | Line 10577 | JOIN Depts On D.HEAD_DEPT = Depts.DEPT_N
10577   )
10578  
10579   Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE,
10580 < A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH
10580 > A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH,
10581 > CASE When A.SALARY > 10000 then 'higher paid' else 'lower paid' End
10582   From EMPLOYEE A
10583   JOIN Depts D On D.DEPT_NO = A.DEPT_NO
10584   ;
# Line 10409 | Line 10586 | JOIN Depts D On D.DEPT_NO = A.DEPT_NO
10586   /* View: PHONE_LIST, Owner: SYSDBA */
10587  
10588   CREATE VIEW PHONE_LIST (
10589 <  EMP_NO,
10590 <  FIRST_NAME,
10591 <  LAST_NAME,
10592 <  PHONE_EXT,
10593 <  LOCATION,
10589 >  EMP_NO,
10590 >  FIRST_NAME,
10591 >  LAST_NAME,
10592 >  PHONE_EXT,
10593 >  LOCATION,
10594    PHONE_NO
10595   ) AS
10596   SELECT
# Line 10515 | Line 10692 | CREATE EXCEPTION REASSIGN_SALES 'Reassig
10692   CREATE EXCEPTION UNKNOWN_EMP_ID 'Invalid employee number or project id.';
10693   COMMIT WORK;
10694   SET AUTODDL OFF;
10695 < SET TERM ^ ;
10695 > SET TERM ^;
10696  
10697   /* Package Definitions */
10698  
10699 < CREATE PACKAGE FB$OUT                                                        
10699 > CREATE PACKAGE FB$OUT
10700   AS
10524
10701   begin
10702          procedure enable;
10703          procedure disable;
# Line 10531 | Line 10707 | begin
10707  
10708          procedure get_lines returns (lines fb$out_type);
10709   end
10710 < ^
10710 > ^
10711  
10712 < CREATE PACKAGE SELECT$TEST                                                    
10712 > CREATE PACKAGE SELECT$TEST
10713   AS
10538
10714   Begin
10715    Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer);
10716   End
10717 < ^
10717 > ^
10718  
10719 < SET TERM ; ^
10719 > SET TERM ;^
10720   COMMIT WORK;
10721   SET AUTODDL ON;
10722   COMMIT WORK;
10723   SET AUTODDL OFF;
10724 < SET TERM ^ ;
10724 > SET TERM ^;
10725  
10726   /* Stored procedures Definitions*/
10727  
10728 < CREATE PROCEDURE SHOW_LANGS
10728 > CREATE PROCEDURE SHOW_LANGS
10729   (
10730    CODE VARCHAR(5) CHARACTER SET NONE,
10731    GRADE SMALLINT,
# Line 10562 | Line 10737 | RETURNS
10737   )
10738   AS
10739   BEGIN SUSPEND; EXIT; END
10565
10740   ^
10741  
10742 < CREATE PROCEDURE ADD_EMP_PROJ
10742 > CREATE PROCEDURE ADD_EMP_PROJ
10743   (
10744    EMP_NO SMALLINT,
10745    PROJ_ID CHAR(5) CHARACTER SET NONE
10746   )
10747   AS
10748   BEGIN EXIT; END
10575
10749   ^
10750  
10751 < CREATE PROCEDURE ALL_LANGS
10751 > CREATE PROCEDURE ALL_LANGS
10752   RETURNS
10753   (
10754    CODE VARCHAR(5) CHARACTER SET NONE,
# Line 10585 | Line 10758 | RETURNS
10758   )
10759   AS
10760   BEGIN SUSPEND; EXIT; END
10588
10761   ^
10762  
10763 < CREATE PROCEDURE DELETE_EMPLOYEE
10763 > CREATE PROCEDURE DELETE_EMPLOYEE
10764   (
10765    EMP_NUM INTEGER
10766   )
10767   AS
10768   BEGIN EXIT; END
10597
10769   ^
10770  
10771 < CREATE PROCEDURE DEPT_BUDGET
10771 > CREATE PROCEDURE DEPT_BUDGET
10772   (
10773    DNO CHAR(3) CHARACTER SET NONE
10774   )
10775   RETURNS
10776   (
10777 <  TOT DECIMAL(12, 2)
10777 >  TOT DECIMAL(12,2)
10778   )
10779   AS
10780   BEGIN SUSPEND; EXIT; END
10781 + ^
10782  
10783 + CREATE PROCEDURE EMPLOYEE_PAY_STATUS
10784 + (
10785 +  EMP_NUM SMALLINT
10786 + )
10787 + RETURNS
10788 + (
10789 +  PAY_STATUS VARCHAR(6) CHARACTER SET NONE,
10790 +  SALARY NUMERIC(10,2)
10791 + )
10792 + AS
10793 + BEGIN EXIT; END
10794   ^
10795  
10796 < CREATE PROCEDURE GET_EMP_PROJ
10796 > CREATE PROCEDURE GET_EMP_PROJ
10797   (
10798    EMP_NO SMALLINT
10799   )
# Line 10620 | Line 10803 | RETURNS
10803   )
10804   AS
10805   BEGIN SUSPEND; EXIT; END
10623
10806   ^
10807  
10808 < CREATE PROCEDURE "Has Space"
10808 > CREATE PROCEDURE "Has Space"
10809   (
10810    ARG1 INTEGER
10811   )
10812   AS
10813   BEGIN EXIT; END
10632
10814   ^
10815  
10816 < CREATE PROCEDURE MAIL_LABEL
10816 > CREATE PROCEDURE MAIL_LABEL
10817   (
10818    CUST_NO INTEGER
10819   )
# Line 10647 | Line 10828 | RETURNS
10828   )
10829   AS
10830   BEGIN SUSPEND; EXIT; END
10650
10831   ^
10832  
10833 < CREATE PROCEDURE ORG_CHART
10833 > CREATE PROCEDURE ORG_CHART
10834   RETURNS
10835   (
10836    HEAD_DEPT CHAR(25) CHARACTER SET NONE,
# Line 10661 | Line 10841 | RETURNS
10841   )
10842   AS
10843   BEGIN SUSPEND; EXIT; END
10664
10844   ^
10845  
10846 < CREATE PROCEDURE SHIP_ORDER
10846 > CREATE PROCEDURE SHIP_ORDER
10847   (
10848    PO_NUM CHAR(8) CHARACTER SET NONE
10849   )
10850   AS
10851   BEGIN EXIT; END
10673
10852   ^
10853  
10854 < CREATE PROCEDURE SUB_TOT_BUDGET
10854 > CREATE PROCEDURE SUB_TOT_BUDGET
10855   (
10856    HEAD_DEPT CHAR(3) CHARACTER SET NONE
10857   )
10858   RETURNS
10859   (
10860 <  TOT_BUDGET DECIMAL(12, 2),
10861 <  AVG_BUDGET DECIMAL(12, 2),
10862 <  MIN_BUDGET DECIMAL(12, 2),
10863 <  MAX_BUDGET DECIMAL(12, 2)
10860 >  TOT_BUDGET DECIMAL(12,2),
10861 >  AVG_BUDGET DECIMAL(12,2),
10862 >  MIN_BUDGET DECIMAL(12,2),
10863 >  MAX_BUDGET DECIMAL(12,2)
10864   )
10865   AS
10866   BEGIN SUSPEND; EXIT; END
10689
10867   ^
10868  
10869 < CREATE PROCEDURE "UC SPACE"
10869 > CREATE PROCEDURE "UC SPACE"
10870   (
10871    ARG1 INTEGER
10872   )
10873   AS
10874   BEGIN EXIT; END
10698
10875   ^
10876  
10877 < CREATE PROCEDURE "iCASE"
10877 > CREATE PROCEDURE "iCASE"
10878   AS
10879   BEGIN EXIT; END
10704
10880   ^
10881  
10882 < SET TERM ; ^
10882 > SET TERM ;^
10883   COMMIT WORK;
10884   SET AUTODDL ON;
10885   COMMIT WORK;
10886   SET AUTODDL OFF;
10887 < SET TERM ^ ;
10887 > SET TERM ^;
10888  
10889   /* Stored Function declarations */
10890  
10891   CREATE FUNCTION F (X INTEGER)
10892   RETURNS INTEGER
10893   AS BEGIN END
10719
10894   ^
10895  
10896 <
10723 < SET TERM ; ^
10896 > SET TERM ;^
10897   COMMIT WORK;
10898   SET AUTODDL ON;
10899 < SET TERM ^ ;
10899 > SET TERM ^;
10900  
10901  
10902   /* Triggers only will work for SQL triggers */
# Line 10733 | Line 10906 | ACTIVE ON CONNECT POSITION 0
10906   as
10907   begin
10908   End
10909 < ^
10909 > ^
10910 >
10911   CREATE TRIGGER "BEFORE CREATE TABLE"
10912   ACTIVE BEFORE CREATE TABLE POSITION 0
10913   AS BEGIN END
10914 < ^
10914 > ^
10915 >
10916   CREATE TRIGGER "AFTER CREATE TABLE"
10917   ACTIVE AFTER CREATE TABLE POSITION 0
10918   AS BEGIN END
10919 < ^
10919 > ^
10920 >
10921   CREATE TRIGGER "BEFORE ALTER TABLE"
10922   ACTIVE BEFORE ALTER TABLE POSITION 0
10923   AS BEGIN END
10924 < ^
10924 > ^
10925 >
10926   CREATE TRIGGER "AFTER ALTER TABLE"
10927   ACTIVE AFTER ALTER TABLE POSITION 0
10928   AS BEGIN END
10929 < ^
10929 > ^
10930 >
10931   CREATE TRIGGER "AFTER CREATE/Alter TABLE"
10932   ACTIVE AFTER CREATE TABLE OR ALTER TABLE POSITION 0
10933   AS BEGIN END
10934 < ^
10934 > ^
10935 >
10936   CREATE TRIGGER "BEFORE DROP TABLE"
10937   ACTIVE BEFORE Drop TABLE POSITION 0
10938   AS BEGIN END
10939 < ^
10939 > ^
10940 >
10941   CREATE TRIGGER "AFTER DROP TABLE"
10942   ACTIVE AFTER Drop TABLE POSITION 0
10943   AS BEGIN END
10944 < ^
10944 > ^
10945 >
10946   CREATE TRIGGER "BEFORE CREATE PROCEDURE"
10947   ACTIVE BEFORE CREATE PROCEDURE POSITION 0
10948   AS BEGIN END
10949 < ^
10949 > ^
10950 >
10951   CREATE TRIGGER "AFTER CREATE PROCEDURE"
10952   ACTIVE AFTER CREATE PROCEDURE POSITION 0
10953   AS BEGIN END
10954 < ^
10954 > ^
10955 >
10956   CREATE TRIGGER "BEFORE ALTER PROCEDURE"
10957   ACTIVE BEFORE ALTER PROCEDURE POSITION 0
10958   AS BEGIN END
10959 < ^
10959 > ^
10960 >
10961   CREATE TRIGGER "AFTER ALTER PROCEDURE"
10962   ACTIVE AFTER ALTER PROCEDURE POSITION 0
10963   AS BEGIN END
10964 < ^
10964 > ^
10965 >
10966   CREATE TRIGGER "BEFORE DROP PROCEDURE"
10967   ACTIVE BEFORE Drop PROCEDURE POSITION 0
10968   AS BEGIN END
10969 < ^
10969 > ^
10970 >
10971   CREATE TRIGGER "AFTER DROP PROCEDURE"
10972   ACTIVE AFTER Drop PROCEDURE POSITION 0
10973   AS BEGIN END
10974 < ^
10974 > ^
10975 >
10976   CREATE TRIGGER "BEFORE CREATE FUNCTION"
10977   ACTIVE BEFORE CREATE FUNCTION POSITION 0
10978   AS BEGIN END
10979 < ^
10979 > ^
10980 >
10981   CREATE TRIGGER "AFTER CREATE FUNCTION"
10982   ACTIVE AFTER CREATE FUNCTION POSITION 0
10983   AS BEGIN END
10984 < ^
10984 > ^
10985 >
10986   CREATE TRIGGER "BEFORE ALTER FUNCTION"
10987   ACTIVE BEFORE ALTER FUNCTION POSITION 0
10988   AS BEGIN END
10989 < ^
10989 > ^
10990 >
10991   CREATE TRIGGER "AFTER ALTER FUNCTION"
10992   ACTIVE AFTER ALTER FUNCTION POSITION 0
10993   AS BEGIN END
10994 < ^
10994 > ^
10995 >
10996   CREATE TRIGGER "BEFORE DROP FUNCTION"
10997   ACTIVE BEFORE Drop FUNCTION POSITION 0
10998   AS BEGIN END
10999 < ^
10999 > ^
11000 >
11001   CREATE TRIGGER "AFTER DROP FUNCTION"
11002   ACTIVE AFTER Drop FUNCTION POSITION 0
11003   AS BEGIN END
11004 < ^
11004 > ^
11005 >
11006   CREATE TRIGGER "BEFORE CREATE TRIGGER"
11007   ACTIVE BEFORE CREATE TRIGGER POSITION 0
11008   AS BEGIN END
11009 < ^
11009 > ^
11010 >
11011   CREATE TRIGGER "AFTER CREATE TRIGGER"
11012   ACTIVE AFTER CREATE TRIGGER POSITION 0
11013   AS BEGIN END
11014 < ^
11014 > ^
11015 >
11016   CREATE TRIGGER "BEFORE ALTER TRIGGER"
11017   ACTIVE BEFORE ALTER TRIGGER POSITION 0
11018   AS BEGIN END
11019 < ^
11019 > ^
11020 >
11021   CREATE TRIGGER "AFTER ALTER TRIGGER"
11022   ACTIVE AFTER ALTER TRIGGER POSITION 0
11023   AS BEGIN END
11024 < ^
11024 > ^
11025 >
11026   CREATE TRIGGER "BEFORE DROP TRIGGER"
11027   ACTIVE BEFORE Drop TRIGGER POSITION 0
11028   AS BEGIN END
11029 < ^
11029 > ^
11030 >
11031   CREATE TRIGGER "AFTER DROP TRIGGER"
11032   ACTIVE AFTER Drop TRIGGER POSITION 0
11033   AS BEGIN END
11034 < ^
11034 > ^
11035 >
11036   CREATE TRIGGER "BEFORE CREATE EXCEPTION"
11037   ACTIVE BEFORE CREATE EXCEPTION POSITION 0
11038   AS BEGIN END
11039 < ^
11039 > ^
11040 >
11041   CREATE TRIGGER "AFTER CREATE EXCEPTION"
11042   ACTIVE AFTER CREATE EXCEPTION POSITION 0
11043   AS BEGIN END
11044 < ^
11044 > ^
11045 >
11046   CREATE TRIGGER "BEFORE ALTER EXCEPTION"
11047   ACTIVE BEFORE ALTER EXCEPTION POSITION 0
11048   AS BEGIN END
11049 < ^
11049 > ^
11050 >
11051   CREATE TRIGGER "AFTER ALTER EXCEPTION"
11052   ACTIVE AFTER ALTER EXCEPTION POSITION 0
11053   AS BEGIN END
11054 < ^
11054 > ^
11055 >
11056   CREATE TRIGGER "BEFORE DROP EXCEPTION"
11057   ACTIVE BEFORE Drop EXCEPTION POSITION 0
11058   AS BEGIN END
11059 < ^
11059 > ^
11060 >
11061   CREATE TRIGGER "AFTER DROP EXCEPTION"
11062   ACTIVE AFTER Drop EXCEPTION POSITION 0
11063   AS BEGIN END
11064 < ^
11064 > ^
11065 >
11066   CREATE TRIGGER "BEFORE CREATE VIEW"
11067   ACTIVE BEFORE CREATE VIEW POSITION 0
11068   AS BEGIN END
11069 < ^
11069 > ^
11070 >
11071   CREATE TRIGGER "AFTER CREATE VIEW"
11072   ACTIVE AFTER CREATE VIEW POSITION 0
11073   AS BEGIN END
11074 < ^
11074 > ^
11075 >
11076   CREATE TRIGGER "BEFORE ALTER VIEW"
11077   ACTIVE BEFORE ALTER VIEW POSITION 0
11078   AS BEGIN END
11079 < ^
11079 > ^
11080 >
11081   CREATE TRIGGER "AFTER ALTER VIEW"
11082   ACTIVE AFTER ALTER VIEW POSITION 0
11083   AS BEGIN END
11084 < ^
11084 > ^
11085 >
11086   CREATE TRIGGER "BEFORE DROP VIEW"
11087   ACTIVE BEFORE Drop VIEW POSITION 0
11088   AS BEGIN END
11089 < ^
11089 > ^
11090 >
11091   CREATE TRIGGER "AFTER DROP VIEW"
11092   ACTIVE AFTER Drop VIEW POSITION 0
11093   AS BEGIN END
11094 < ^
11094 > ^
11095 >
11096   CREATE TRIGGER "BEFORE CREATE DOMAIN"
11097   ACTIVE BEFORE CREATE DOMAIN POSITION 0
11098   AS BEGIN END
11099 < ^
11099 > ^
11100 >
11101   CREATE TRIGGER "AFTER CREATE DOMAIN"
11102   ACTIVE AFTER CREATE DOMAIN POSITION 0
11103   AS BEGIN END
11104 < ^
11104 > ^
11105 >
11106   CREATE TRIGGER "BEFORE ALTER DOMAIN"
11107   ACTIVE BEFORE ALTER DOMAIN POSITION 0
11108   AS BEGIN END
11109 < ^
11109 > ^
11110 >
11111   CREATE TRIGGER "AFTER ALTER DOMAIN"
11112   ACTIVE AFTER ALTER DOMAIN POSITION 0
11113   AS BEGIN END
11114 < ^
11114 > ^
11115 >
11116   CREATE TRIGGER "BEFORE DROP DOMAIN"
11117   ACTIVE BEFORE Drop DOMAIN POSITION 0
11118   AS BEGIN END
11119 < ^
11119 > ^
11120 >
11121   CREATE TRIGGER "AFTER DROP DOMAIN"
11122   ACTIVE AFTER Drop DOMAIN POSITION 0
11123   AS BEGIN END
11124 < ^
11124 > ^
11125 >
11126   CREATE TRIGGER "BEFORE CREATE ROLE"
11127   ACTIVE BEFORE CREATE ROLE POSITION 0
11128   AS BEGIN END
11129 < ^
11129 > ^
11130 >
11131   CREATE TRIGGER "AFTER CREATE ROLE"
11132   ACTIVE AFTER CREATE ROLE POSITION 0
11133   AS BEGIN END
11134 < ^
11134 > ^
11135 >
11136   CREATE TRIGGER "BEFORE ALTER ROLE"
11137   ACTIVE BEFORE ALTER ROLE POSITION 0
11138   AS BEGIN END
11139 < ^
11139 > ^
11140 >
11141   CREATE TRIGGER "AFTER ALTER ROLE"
11142   ACTIVE AFTER ALTER ROLE POSITION 0
11143   AS BEGIN END
11144 < ^
11144 > ^
11145 >
11146   CREATE TRIGGER "BEFORE DROP ROLE"
11147   ACTIVE BEFORE Drop ROLE POSITION 0
11148   AS BEGIN END
11149 < ^
11149 > ^
11150 >
11151   CREATE TRIGGER "AFTER DROP ROLE"
11152   ACTIVE AFTER Drop ROLE POSITION 0
11153   AS BEGIN END
11154 < ^
11154 > ^
11155 >
11156   CREATE TRIGGER "BEFORE CREATE INDEX"
11157   ACTIVE BEFORE CREATE INDEX POSITION 0
11158   AS BEGIN END
11159 < ^
11159 > ^
11160 >
11161   CREATE TRIGGER "AFTER CREATE INDEX"
11162   ACTIVE AFTER CREATE INDEX POSITION 0
11163   AS BEGIN END
11164 < ^
11164 > ^
11165 >
11166   CREATE TRIGGER "BEFORE ALTER INDEX"
11167   ACTIVE BEFORE ALTER INDEX POSITION 0
11168   AS BEGIN END
11169 < ^
11169 > ^
11170 >
11171   CREATE TRIGGER "AFTER ALTER INDEX"
11172   ACTIVE AFTER ALTER INDEX POSITION 0
11173   AS BEGIN END
11174 < ^
11174 > ^
11175 >
11176   CREATE TRIGGER "BEFORE DROP INDEX"
11177   ACTIVE BEFORE Drop INDEX POSITION 0
11178   AS BEGIN END
11179 < ^
11179 > ^
11180 >
11181   CREATE TRIGGER "AFTER DROP INDEX"
11182   ACTIVE AFTER Drop INDEX POSITION 0
11183   AS BEGIN END
11184 < ^
11184 > ^
11185 >
11186   CREATE TRIGGER "BEFORE CREATE SEQUENCE"
11187   ACTIVE BEFORE CREATE SEQUENCE POSITION 0
11188   AS BEGIN END
11189 < ^
11189 > ^
11190 >
11191   CREATE TRIGGER "AFTER CREATE SEQUENCE"
11192   ACTIVE AFTER CREATE SEQUENCE POSITION 0
11193   AS BEGIN END
11194 < ^
11194 > ^
11195 >
11196   CREATE TRIGGER "BEFORE ALTER SEQUENCE"
11197   ACTIVE BEFORE ALTER SEQUENCE POSITION 0
11198   AS BEGIN END
11199 < ^
11199 > ^
11200 >
11201   CREATE TRIGGER "AFTER ALTER SEQUENCE"
11202   ACTIVE AFTER ALTER SEQUENCE POSITION 0
11203   AS BEGIN END
11204 < ^
11204 > ^
11205 >
11206   CREATE TRIGGER "BEFORE DROP SEQUENCE"
11207   ACTIVE BEFORE Drop SEQUENCE POSITION 0
11208   AS BEGIN END
11209 < ^
11209 > ^
11210 >
11211   CREATE TRIGGER "AFTER DROP SEQUENCE"
11212   ACTIVE AFTER Drop SEQUENCE POSITION 0
11213   AS BEGIN END
11214 < ^
11214 > ^
11215 >
11216   CREATE TRIGGER "BEFORE CREATE USER"
11217   ACTIVE BEFORE CREATE USER POSITION 0
11218   AS BEGIN END
11219 < ^
11219 > ^
11220 >
11221   CREATE TRIGGER "AFTER CREATE USER"
11222   ACTIVE AFTER CREATE USER POSITION 0
11223   AS BEGIN END
11224 < ^
11224 > ^
11225 >
11226   CREATE TRIGGER "BEFORE ALTER USER"
11227   ACTIVE BEFORE ALTER USER POSITION 0
11228   AS BEGIN END
11229 < ^
11229 > ^
11230 >
11231   CREATE TRIGGER "AFTER ALTER USER"
11232   ACTIVE AFTER ALTER USER POSITION 0
11233   AS BEGIN END
11234 < ^
11234 > ^
11235 >
11236   CREATE TRIGGER "BEFORE DROP USER"
11237   ACTIVE BEFORE Drop USER POSITION 0
11238   AS BEGIN END
11239 < ^
11239 > ^
11240 >
11241   CREATE TRIGGER "AFTER DROP USER"
11242   ACTIVE AFTER Drop USER POSITION 0
11243   AS BEGIN END
11244 < ^
11244 > ^
11245 >
11246   CREATE TRIGGER "BEFORE CREATE COLLATION"
11247   ACTIVE BEFORE CREATE COLLATION POSITION 0
11248   AS BEGIN END
11249 < ^
11249 > ^
11250 >
11251   CREATE TRIGGER "AFTER CREATE COLLATION"
11252   ACTIVE AFTER CREATE COLLATION POSITION 0
11253   AS BEGIN END
11254 < ^
11254 > ^
11255 >
11256   CREATE TRIGGER "BEFORE DROP COLLATION"
11257   ACTIVE BEFORE Drop COLLATION POSITION 0
11258   AS BEGIN END
11259 < ^
11259 > ^
11260 >
11261   CREATE TRIGGER "AFTER DROP COLLATION"
11262   ACTIVE AFTER Drop COLLATION POSITION 0
11263   AS BEGIN END
11264 < ^
11264 > ^
11265 >
11266   CREATE TRIGGER "BEFORE ALTER CHARACTER SET"
11267   ACTIVE BEFORE ALTER CHARACTER SET POSITION 0
11268   AS BEGIN END
11269 < ^
11269 > ^
11270 >
11271   CREATE TRIGGER "AFTER ALTER CHARACTER SET"
11272   ACTIVE AFTER ALTER CHARACTER SET POSITION 0
11273   AS BEGIN END
11274 < ^
11274 > ^
11275 >
11276   CREATE TRIGGER "BEFORE CREATE PACKAGE"
11277   ACTIVE BEFORE CREATE PACKAGE POSITION 0
11278   AS BEGIN END
11279 < ^
11279 > ^
11280 >
11281   CREATE TRIGGER "AFTER CREATE PACKAGE"
11282   ACTIVE AFTER CREATE PACKAGE POSITION 0
11283   AS BEGIN END
11284 < ^
11284 > ^
11285 >
11286   CREATE TRIGGER "BEFORE ALTER PACKAGE"
11287   ACTIVE BEFORE ALTER PACKAGE POSITION 0
11288   AS BEGIN END
11289 < ^
11289 > ^
11290 >
11291   CREATE TRIGGER "AFTER ALTER PACKAGE"
11292   ACTIVE AFTER ALTER PACKAGE POSITION 0
11293   AS BEGIN END
11294 < ^
11294 > ^
11295 >
11296   CREATE TRIGGER "BEFORE DROP PACKAGE"
11297   ACTIVE BEFORE Drop PACKAGE POSITION 0
11298   AS BEGIN END
11299 < ^
11299 > ^
11300 >
11301   CREATE TRIGGER "AFTER DROP PACKAGE"
11302   ACTIVE AFTER Drop PACKAGE POSITION 0
11303   AS BEGIN END
11304 < ^
11304 > ^
11305 >
11306   CREATE TRIGGER "BEFORE CREATE PACKAGE BODY"
11307   ACTIVE BEFORE CREATE PACKAGE BODY POSITION 0
11308   AS BEGIN END
11309 < ^
11309 > ^
11310 >
11311   CREATE TRIGGER "AFTER CREATE PACKAGE BODY"
11312   ACTIVE AFTER CREATE PACKAGE BODY POSITION 0
11313   AS BEGIN END
11314 < ^
11314 > ^
11315 >
11316   CREATE TRIGGER "BEFORE DROP PACKAGE BODY"
11317   ACTIVE BEFORE Drop PACKAGE BODY POSITION 0
11318   AS BEGIN END
11319 < ^
11319 > ^
11320 >
11321   CREATE TRIGGER "AFTER DROP PACKAGE BODY"
11322   ACTIVE AFTER Drop PACKAGE BODY POSITION 0
11323   AS BEGIN END
11324 < ^
11324 > ^
11325 >
11326   CREATE TRIGGER "BEFORE ANY DDL STATEMENT"
11327   ACTIVE BEFORE ANY DDL STATEMENT POSITION 0
11328   AS BEGIN END
11329 < ^
11329 > ^
11330 >
11331   CREATE TRIGGER "AFTER ANY DDL STATEMENT"
11332   ACTIVE AFTER ANY DDL STATEMENT POSITION 0
11333   AS BEGIN END
11334 < ^
11334 > ^
11335 >
11336   CREATE TRIGGER SET_CUST_NO FOR CUSTOMER
11337   ACTIVE BEFORE INSERT POSITION 0
11338   AS
# Line 11081 | Line 11340 | BEGIN
11340      if (new.cust_no is null) then
11341      new.cust_no = gen_id(cust_no_gen, 1);
11342   END
11343 < ^
11343 > ^
11344 >
11345   CREATE TRIGGER SET_EMP_NO FOR EMPLOYEE
11346   ACTIVE BEFORE INSERT POSITION 0
11347   AS
# Line 11089 | Line 11349 | BEGIN
11349      if (new.emp_no is null) then
11350      new.emp_no = gen_id(emp_no_gen, 1);
11351   END
11352 < ^
11352 > ^
11353 >
11354   CREATE TRIGGER SAVE_SALARY_CHANGE FOR EMPLOYEE
11355   ACTIVE AFTER UPDATE POSITION 0
11356   AS
# Line 11104 | Line 11365 | BEGIN
11365              old.salary,
11366              (new.salary - old.salary) * 100 / old.salary);
11367   END
11368 < ^
11368 > ^
11369 >
11370   CREATE TRIGGER POST_NEW_ORDER FOR SALES
11371   ACTIVE AFTER INSERT POSITION 0
11372   AS
11373   BEGIN
11374      POST_EVENT 'new_order';
11375   END
11376 < ^
11377 < COMMIT WORK ^
11376 > ^
11377 >
11378 > COMMIT WORK^
11379   SET TERM ;^
11380   COMMIT WORK;
11381   SET AUTODDL OFF;
11382 < SET TERM ^ ;
11382 > SET TERM ^;
11383  
11384   /* Package Definitions */
11385  
11386 < CREATE PACKAGE BODY FB$OUT                                                        
11386 > CREATE PACKAGE BODY FB$OUT
11387   AS
11125
11388   begin
11389          procedure enable
11390          as
# Line 11177 | Line 11439 | begin
11439                  execute procedure clear;
11440          end
11441   end
11442 < ^
11442 > ^
11443  
11444 < CREATE PACKAGE BODY SELECT$TEST                                                    
11444 > CREATE PACKAGE BODY SELECT$TEST
11445   AS
11184
11446   Begin
11447    Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer)
11448    As
# Line 11189 | Line 11450 | Begin
11450      SUSPEND;
11451    End
11452   End
11453 < ^
11453 > ^
11454  
11455 < SET TERM ; ^
11455 > SET TERM ;^
11456   COMMIT WORK;
11457   SET AUTODDL ON;
11458   COMMIT WORK;
11459   SET AUTODDL OFF;
11460 < SET TERM ^ ;
11460 > SET TERM ^;
11461  
11462   /* Stored procedure Bodies */
11463  
11464 <
11204 < ALTER PROCEDURE SHOW_LANGS
11464 > ALTER PROCEDURE SHOW_LANGS
11465   (
11466    CODE VARCHAR(5) CHARACTER SET NONE,
11467    GRADE SMALLINT,
# Line 11222 | Line 11482 | BEGIN
11482             AND (language_req IS NOT NULL))
11483      INTO :languages;
11484      IF (languages = ' ') THEN  /* Prints 'NULL' instead of blanks */
11485 <       languages = 'NULL';        
11485 >       languages = 'NULL';
11486      i = i +1;
11487      SUSPEND;
11488    END
11489   END
11490 < ^
11231 <
11490 > ^
11491  
11492 < ALTER PROCEDURE ADD_EMP_PROJ
11492 > ALTER PROCEDURE ADD_EMP_PROJ
11493   (
11494    EMP_NO SMALLINT,
11495    PROJ_ID CHAR(5) CHARACTER SET NONE
# Line 11243 | Line 11502 | BEGIN
11502                  EXCEPTION unknown_emp_id;
11503          END
11504   END
11505 < ^
11247 <
11505 > ^
11506  
11507 < ALTER PROCEDURE ALL_LANGS
11507 > ALTER PROCEDURE ALL_LANGS
11508   RETURNS
11509   (
11510    CODE VARCHAR(5) CHARACTER SET NONE,
# Line 11256 | Line 11514 | RETURNS
11514   )
11515   AS
11516   BEGIN
11517 <        FOR SELECT job_code, job_grade, job_country FROM job
11517 >        FOR SELECT job_code, job_grade, job_country FROM job
11518                  INTO :code, :grade, :country
11519  
11520          DO
11521          BEGIN
11522 <            FOR SELECT languages FROM show_langs
11522 >            FOR SELECT languages FROM show_langs
11523                      (:code, :grade, :country) INTO :lang DO
11524                  SUSPEND;
11525              /* Put nice separators between rows */
# Line 11272 | Line 11530 | BEGIN
11530              SUSPEND;
11531          END
11532      END
11533 < ^
11276 <
11533 > ^
11534  
11535 < ALTER PROCEDURE DELETE_EMPLOYEE
11535 > ALTER PROCEDURE DELETE_EMPLOYEE
11536   (
11537    EMP_NUM INTEGER
11538   )
# Line 11286 | Line 11543 | BEGIN
11543  
11544          /*
11545           *      If there are any sales records referencing this employee,
11546 <         *      can't delete the employee until the sales are re-assigned
11546 >         *      cannot delete the employee until the sales are re-assigned
11547           *      to another employee or changed to NULL.
11548           */
11549          SELECT count(po_number)
# Line 11332 | Line 11589 | BEGIN
11589          WHERE emp_no = :emp_num;
11590  
11591   END
11592 < ^
11336 <
11592 > ^
11593  
11594 < ALTER PROCEDURE DEPT_BUDGET
11594 > ALTER PROCEDURE DEPT_BUDGET
11595   (
11596    DNO CHAR(3) CHARACTER SET NONE
11597   )
11598   RETURNS
11599   (
11600 <  TOT DECIMAL(12, 2)
11600 >  TOT DECIMAL(12,2)
11601   )
11602   AS
11603 < DECLARE VARIABLE sumb DECIMAL(12, 2);
11603 > DECLARE VARIABLE sumb DECIMAL(12,2);
11604          DECLARE VARIABLE rdno CHAR(3);
11605          DECLARE VARIABLE cnt INTEGER;
11606   BEGIN
# Line 11369 | Line 11625 | BEGIN
11625  
11626          SUSPEND;
11627   END
11628 < ^
11628 > ^
11629  
11630 + ALTER PROCEDURE EMPLOYEE_PAY_STATUS
11631 + (
11632 +  EMP_NUM SMALLINT
11633 + )
11634 + RETURNS
11635 + (
11636 +  PAY_STATUS VARCHAR(6) CHARACTER SET NONE,
11637 +  SALARY NUMERIC(10,2)
11638 + )
11639 + AS
11640 + Declare aCursor CURSOR FOR (
11641 +    Select EMP_NO,SALARY From EMPLOYEE WHERE LAST_NAME = 'unknown');
11642 + BEGIN
11643 +  Select SALARY, Case
11644 +   When SALARY > 10000 and SALARY <= 100000 then 'higher'
11645 +   When SALARY > 100000 then 'gross'
11646 +   else 'lower' End
11647 +  From employee
11648 +    WHERE emp_no = :EMP_NUM
11649 +   into :SALARY, :PAY_STATUS;
11650 + END
11651 + ^
11652  
11653 < ALTER PROCEDURE GET_EMP_PROJ
11653 > ALTER PROCEDURE GET_EMP_PROJ
11654   (
11655    EMP_NO SMALLINT
11656   )
# Line 11389 | Line 11667 | BEGIN
11667          DO
11668                  SUSPEND;
11669   END
11670 < ^
11393 <
11670 > ^
11671  
11672 < ALTER PROCEDURE "Has Space"
11672 > ALTER PROCEDURE "Has Space"
11673   (
11674    ARG1 INTEGER
11675   )
11676   AS
11677   Begin End
11678 < ^
11402 <
11678 > ^
11679  
11680 < ALTER PROCEDURE MAIL_LABEL
11680 > ALTER PROCEDURE MAIL_LABEL
11681   (
11682    CUST_NO INTEGER
11683   )
# Line 11469 | Line 11745 | BEGIN
11745  
11746          SUSPEND;
11747   END
11748 < ^
11473 <
11748 > ^
11749  
11750 < ALTER PROCEDURE ORG_CHART
11750 > ALTER PROCEDURE ORG_CHART
11751   RETURNS
11752   (
11753    HEAD_DEPT CHAR(25) CHARACTER SET NONE,
# Line 11512 | Line 11787 | BEGIN
11787                  SUSPEND;
11788          END
11789   END
11790 < ^
11516 <
11790 > ^
11791  
11792 < ALTER PROCEDURE SHIP_ORDER
11792 > ALTER PROCEDURE SHIP_ORDER
11793   (
11794    PO_NUM CHAR(8) CHARACTER SET NONE
11795   )
# Line 11572 | Line 11846 | BEGIN
11846          WHERE po_number = :po_num;
11847  
11848   END
11849 < ^
11576 <
11849 > ^
11850  
11851 < ALTER PROCEDURE SUB_TOT_BUDGET
11851 > ALTER PROCEDURE SUB_TOT_BUDGET
11852   (
11853    HEAD_DEPT CHAR(3) CHARACTER SET NONE
11854   )
11855   RETURNS
11856   (
11857 <  TOT_BUDGET DECIMAL(12, 2),
11858 <  AVG_BUDGET DECIMAL(12, 2),
11859 <  MIN_BUDGET DECIMAL(12, 2),
11860 <  MAX_BUDGET DECIMAL(12, 2)
11857 >  TOT_BUDGET DECIMAL(12,2),
11858 >  AVG_BUDGET DECIMAL(12,2),
11859 >  MIN_BUDGET DECIMAL(12,2),
11860 >  MAX_BUDGET DECIMAL(12,2)
11861   )
11862   AS
11863   BEGIN
# Line 11594 | Line 11867 | BEGIN
11867                  INTO :tot_budget, :avg_budget, :min_budget, :max_budget;
11868          SUSPEND;
11869   END
11870 < ^
11598 <
11870 > ^
11871  
11872 < ALTER PROCEDURE "UC SPACE"
11872 > ALTER PROCEDURE "UC SPACE"
11873   (
11874    ARG1 INTEGER
11875   )
11876   AS
11877   Begin End
11878 < ^
11607 <
11878 > ^
11879  
11880 < ALTER PROCEDURE "iCASE"
11880 > ALTER PROCEDURE "iCASE"
11881   AS
11882   Begin End
11883 < ^
11883 > ^
11884  
11885 < SET TERM ; ^
11885 > SET TERM ;^
11886   COMMIT WORK;
11887   SET AUTODDL ON;
11888   COMMIT WORK;
11889   SET AUTODDL OFF;
11890 < SET TERM ^ ;
11890 > SET TERM ^;
11891  
11892   /* Stored Function Body */
11893  
11894   ALTER FUNCTION F (X INTEGER)
11895   RETURNS INTEGER
11896 < AS
11896 > AS
11897   BEGIN
11898   RETURN X+1;
11899   END
11900   ^
11901  
11902 <
11632 < SET TERM ; ^
11902 > SET TERM ;^
11903   COMMIT WORK;
11904   SET AUTODDL ON;
11905  
# Line 11702 | Line 11972 | Output from diff command
11972   ---
11973   > /* CREATE DATABASE 'inet://localhost//tmp/ibx-testsuite/testsuite1.fdb' PAGE_SIZE 8192
11974   6c6
11975 < <  DEFAULT CHARACTER SET NONE;
11975 > <  DEFAULT CHARACTER SET NONE;
11976   ---
11977   >  DEFAULT CHARACTER SET NONE; */
11978   127c127
11979   <       "KEY"   INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0) NOT NULL,
11980   ---
11981   >       "KEY"   INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL,
11982 < 969c969
11713 < < ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1016;
11714 < ---
11715 < > ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1015;
11716 < 971c971
11717 < < ALTER SEQUENCE EMP_NO_GEN RESTART WITH 158;
11718 < ---
11719 < > ALTER SEQUENCE EMP_NO_GEN RESTART WITH 157;
11720 < 973c973
11721 < < ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 1;
11722 < ---
11723 < > ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 0;
11724 < 2254c2254
11982 > 2346c2346
11983   < GRANT SELECT,Update(FIRST_NAME,LAST_NAME) ON TABLE EMPLOYEE TO USER BOB  ;
11984   ---
11985   > GRANT SELECT,Update(LAST_NAME,FIRST_NAME) ON TABLE EMPLOYEE TO USER BOB  ;
# Line 11779 | Line 12037 | Message File Location = /opt/firebird4.0
12037   Database Statistics for employee
12038  
12039   Database "/opt/firebird4.0.0/examples/empbuild/employee.fdb"
12040 < Gstat execution time Wed Jul  7 11:45:32 2021
12040 > Gstat execution time Sun Oct 17 23:27:55 2021
12041  
12042   Database header page information:
12043   Flags                   0
12044 < Generation              438
12044 > Generation              2732
12045   System Change Number    0
12046   Page size               8192
12047   ODS version             13.0
12048 < Oldest transaction      456
12049 < Oldest active           457
12050 < Oldest snapshot         457
12051 < Next transaction        457
12048 > Oldest transaction      3024
12049 > Oldest active           3025
12050 > Oldest snapshot         3025
12051 > Next transaction        3025
12052   Sequence number         0
12053 < Next attachment ID      274
12053 > Next attachment ID      2444
12054   Implementation          HW=AMD/Intel/x64 little-endian OS=Linux CC=gcc
12055   Shadow count            0
12056   Page buffers            0
# Line 11866 | Line 12124 | EMPLOYEE_PROJECT (134)
12124   Primary pointer page: 258, Index root page: 259
12125   Pointer pages: 1, data page slots: 1
12126   Data pages: 1, average fill: 10%
12127 < Primary pages: 1, secondary pages: 0, swept pages: 0
12127 > Primary pages: 1, secondary pages: 0, swept pages: 1
12128   Empty pages: 0, full pages: 0
12129   Fill distribution:
12130   0 - 19% = 1
# Line 11888 | Line 12146 | Fill distribution:
12146   60 - 79% = 1
12147   80 - 99% = 0
12148  
12149 + LOTSOFDATA (140)
12150 + Primary pointer page: 285, Index root page: 311
12151 + Pointer pages: 1, data page slots: 0
12152 + Data pages: 0, average fill: 0%
12153 + Primary pages: 0, secondary pages: 0, swept pages: 0
12154 + Empty pages: 0, full pages: 0
12155 + Fill distribution:
12156 + 0 - 19% = 0
12157 + 20 - 39% = 0
12158 + 40 - 59% = 0
12159 + 60 - 79% = 0
12160 + 80 - 99% = 0
12161 +
12162   PROJECT (133)
12163   Primary pointer page: 251, Index root page: 252
12164   Pointer pages: 1, data page slots: 2
# Line 11918 | Line 12189 | SALARY_HISTORY (136)
12189   Primary pointer page: 270, Index root page: 271
12190   Pointer pages: 1, data page slots: 1
12191   Data pages: 1, average fill: 30%
12192 < Primary pages: 1, secondary pages: 0, swept pages: 0
12192 > Primary pages: 1, secondary pages: 0, swept pages: 1
12193   Empty pages: 0, full pages: 0
12194   Fill distribution:
12195   0 - 19% = 0
# Line 11940 | Line 12211 | Fill distribution:
12211   60 - 79% = 0
12212   80 - 99% = 0
12213  
12214 < Gstat completion time Wed Jul  7 11:45:32 2021
12214 > Gstat completion time Sun Oct 17 23:27:56 2021
12215  
12216  
12217  
# Line 11950 | Line 12221 | zeus   Wed Jun  9 10:07:18 2021
12221   firebird4/bin/fbguard: guardian starting /opt/firebird4/bin/firebird
12222  
12223   Online Validation
12224 < 11:45:32.71 Validation started
12224 > 23:27:56.66 Validation started
12225  
12226 < 11:45:32.71 Relation 128 (COUNTRY)
12227 < 11:45:32.71   process pointer page    0 of    1
12228 < 11:45:32.71 Index 1 (RDB$PRIMARY1)
12229 < 11:45:32.71 Relation 128 (COUNTRY) is ok
12230 <
12231 < 11:45:32.71 Relation 129 (JOB)
12232 < 11:45:32.71   process pointer page    0 of    1
12233 < 11:45:32.71 Index 1 (RDB$PRIMARY2)
12234 < 11:45:32.71 Index 2 (RDB$FOREIGN3)
12235 < 11:45:32.71 Index 3 (MAXSALX)
12236 < 11:45:32.71 Index 4 (MINSALX)
12237 < 11:45:32.71 Relation 129 (JOB) is ok
12238 <
12239 < 11:45:32.71 Relation 130 (DEPARTMENT)
12240 < 11:45:32.71   process pointer page    0 of    1
12241 < 11:45:32.71 Index 1 (RDB$4)
12242 < 11:45:32.71 Index 2 (RDB$PRIMARY5)
12243 < 11:45:32.71 Index 3 (RDB$FOREIGN6)
12244 < 11:45:32.71 Index 4 (BUDGETX)
12245 < 11:45:32.71 Index 5 (RDB$FOREIGN10)
12246 < 11:45:32.71 Relation 130 (DEPARTMENT) is ok
12247 <
12248 < 11:45:32.71 Relation 131 (EMPLOYEE)
12249 < 11:45:32.71   process pointer page    0 of    1
12250 < 11:45:32.71 Index 1 (RDB$PRIMARY7)
12251 < 11:45:32.71 Index 2 (RDB$FOREIGN8)
12252 < 11:45:32.71 Index 3 (RDB$FOREIGN9)
12253 < 11:45:32.71 Index 4 (NAMEX)
12254 < 11:45:32.71 Relation 131 (EMPLOYEE) is ok
12255 <
12256 < 11:45:32.71 Relation 133 (PROJECT)
12257 < 11:45:32.71   process pointer page    0 of    1
12258 < 11:45:32.71 Index 1 (RDB$11)
12259 < 11:45:32.71 Index 2 (RDB$PRIMARY12)
12260 < 11:45:32.71 Index 3 (RDB$FOREIGN13)
12261 < 11:45:32.71 Index 4 (PRODTYPEX)
12262 < 11:45:32.71 Relation 133 (PROJECT) is ok
12263 <
12264 < 11:45:32.72 Relation 134 (EMPLOYEE_PROJECT)
12265 < 11:45:32.72   process pointer page    0 of    1
12266 < 11:45:32.72 Index 1 (RDB$PRIMARY14)
12267 < 11:45:32.72 Index 2 (RDB$FOREIGN15)
12268 < 11:45:32.72 Index 3 (RDB$FOREIGN16)
12269 < 11:45:32.72 Relation 134 (EMPLOYEE_PROJECT) is ok
12270 <
12271 < 11:45:32.72 Relation 135 (PROJ_DEPT_BUDGET)
12272 < 11:45:32.72   process pointer page    0 of    1
12273 < 11:45:32.72 Index 1 (RDB$PRIMARY17)
12274 < 11:45:32.72 Index 2 (RDB$FOREIGN18)
12275 < 11:45:32.72 Index 3 (RDB$FOREIGN19)
12276 < 11:45:32.73 Relation 135 (PROJ_DEPT_BUDGET) is ok
12277 <
12278 < 11:45:32.73 Relation 136 (SALARY_HISTORY)
12279 < 11:45:32.73   process pointer page    0 of    1
12280 < 11:45:32.73 Index 1 (RDB$PRIMARY20)
12281 < 11:45:32.73 Index 2 (RDB$FOREIGN21)
12282 < 11:45:32.73 Index 3 (CHANGEX)
12283 < 11:45:32.73 Index 4 (UPDATERX)
12284 < 11:45:32.73 Relation 136 (SALARY_HISTORY) is ok
12285 <
12286 < 11:45:32.73 Relation 137 (CUSTOMER)
12287 < 11:45:32.73   process pointer page    0 of    1
12288 < 11:45:32.73 Index 1 (RDB$PRIMARY22)
12289 < 11:45:32.73 Index 2 (RDB$FOREIGN23)
12290 < 11:45:32.73 Index 3 (CUSTNAMEX)
12291 < 11:45:32.73 Index 4 (CUSTREGION)
12292 < 11:45:32.73 Relation 137 (CUSTOMER) is ok
12293 <
12294 < 11:45:32.73 Relation 138 (SALES)
12295 < 11:45:32.73   process pointer page    0 of    1
12296 < 11:45:32.73 Index 1 (RDB$PRIMARY24)
12297 < 11:45:32.73 Index 2 (RDB$FOREIGN25)
12298 < 11:45:32.73 Index 3 (RDB$FOREIGN26)
12299 < 11:45:32.73 Index 4 (NEEDX)
12300 < 11:45:32.73 Index 5 (QTYX)
12301 < 11:45:32.73 Index 6 (SALESTATX)
12302 < 11:45:32.73 Relation 138 (SALES) is ok
12226 > 23:27:56.66 Relation 128 (COUNTRY)
12227 > 23:27:56.66   process pointer page    0 of    1
12228 > 23:27:56.66 Index 1 (RDB$PRIMARY1)
12229 > 23:27:56.66 Relation 128 (COUNTRY) is ok
12230 >
12231 > 23:27:56.66 Relation 129 (JOB)
12232 > 23:27:56.66   process pointer page    0 of    1
12233 > 23:27:56.66 Index 1 (RDB$PRIMARY2)
12234 > 23:27:56.66 Index 2 (RDB$FOREIGN3)
12235 > 23:27:56.66 Index 3 (MAXSALX)
12236 > 23:27:56.69 Index 4 (MINSALX)
12237 > 23:27:56.69 Relation 129 (JOB) is ok
12238 >
12239 > 23:27:56.69 Relation 130 (DEPARTMENT)
12240 > 23:27:56.69   process pointer page    0 of    1
12241 > 23:27:56.69 Index 1 (RDB$4)
12242 > 23:27:56.69 Index 2 (RDB$PRIMARY5)
12243 > 23:27:56.69 Index 3 (RDB$FOREIGN6)
12244 > 23:27:56.69 Index 4 (BUDGETX)
12245 > 23:27:56.69 Index 5 (RDB$FOREIGN10)
12246 > 23:27:56.69 Relation 130 (DEPARTMENT) is ok
12247 >
12248 > 23:27:56.69 Relation 131 (EMPLOYEE)
12249 > 23:27:56.70   process pointer page    0 of    1
12250 > 23:27:56.70 Index 1 (RDB$PRIMARY7)
12251 > 23:27:56.70 Index 2 (RDB$FOREIGN8)
12252 > 23:27:56.70 Index 3 (RDB$FOREIGN9)
12253 > 23:27:56.70 Index 4 (NAMEX)
12254 > 23:27:56.70 Relation 131 (EMPLOYEE) is ok
12255 >
12256 > 23:27:56.70 Relation 133 (PROJECT)
12257 > 23:27:56.70   process pointer page    0 of    1
12258 > 23:27:56.70 Index 1 (RDB$11)
12259 > 23:27:56.70 Index 2 (RDB$PRIMARY12)
12260 > 23:27:56.72 Index 3 (RDB$FOREIGN13)
12261 > 23:27:56.72 Index 4 (PRODTYPEX)
12262 > 23:27:56.72 Relation 133 (PROJECT) is ok
12263 >
12264 > 23:27:56.72 Relation 134 (EMPLOYEE_PROJECT)
12265 > 23:27:56.72   process pointer page    0 of    1
12266 > 23:27:56.72 Index 1 (RDB$PRIMARY14)
12267 > 23:27:56.72 Index 2 (RDB$FOREIGN15)
12268 > 23:27:56.72 Index 3 (RDB$FOREIGN16)
12269 > 23:27:56.72 Relation 134 (EMPLOYEE_PROJECT) is ok
12270 >
12271 > 23:27:56.72 Relation 135 (PROJ_DEPT_BUDGET)
12272 > 23:27:56.72   process pointer page    0 of    1
12273 > 23:27:56.72 Index 1 (RDB$PRIMARY17)
12274 > 23:27:56.73 Index 2 (RDB$FOREIGN18)
12275 > 23:27:56.73 Index 3 (RDB$FOREIGN19)
12276 > 23:27:56.73 Relation 135 (PROJ_DEPT_BUDGET) is ok
12277 >
12278 > 23:27:56.73 Relation 136 (SALARY_HISTORY)
12279 > 23:27:56.73   process pointer page    0 of    1
12280 > 23:27:56.73 Index 1 (RDB$PRIMARY20)
12281 > 23:27:56.73 Index 2 (RDB$FOREIGN21)
12282 > 23:27:56.73 Index 3 (CHANGEX)
12283 > 23:27:56.73 Index 4 (UPDATERX)
12284 > 23:27:56.73 Relation 136 (SALARY_HISTORY) is ok
12285 >
12286 > 23:27:56.73 Relation 137 (CUSTOMER)
12287 > 23:27:56.73   process pointer page    0 of    1
12288 > 23:27:56.73 Index 1 (RDB$PRIMARY22)
12289 > 23:27:56.73 Index 2 (RDB$FOREIGN23)
12290 > 23:27:56.73 Index 3 (CUSTNAMEX)
12291 > 23:27:56.73 Index 4 (CUSTREGION)
12292 > 23:27:56.73 Relation 137 (CUSTOMER) is ok
12293 >
12294 > 23:27:56.73 Relation 138 (SALES)
12295 > 23:27:56.73   process pointer page    0 of    1
12296 > 23:27:56.73 Index 1 (RDB$PRIMARY24)
12297 > 23:27:56.73 Index 2 (RDB$FOREIGN25)
12298 > 23:27:56.73 Index 3 (RDB$FOREIGN26)
12299 > 23:27:56.73 Index 4 (NEEDX)
12300 > 23:27:56.73 Index 5 (QTYX)
12301 > 23:27:56.73 Index 6 (SALESTATX)
12302 > 23:27:56.73 Relation 138 (SALES) is ok
12303 >
12304 > 23:27:56.73 Relation 140 (LOTSOFDATA)
12305 > 23:27:56.73   process pointer page    0 of    1
12306 > 23:27:56.73 Index 1 (RDB$PRIMARY28)
12307 > 23:27:56.73 Relation 140 (LOTSOFDATA) is ok
12308  
12309 < 11:45:32.73 Validation finished
12309 > 23:27:56.73 Validation finished
12310  
12311  
12312   Normal Validation
# Line 12166 | Line 12442 | Employee Database is Online = FALSE
12442   Employee Database is Online = TRUE
12443  
12444   Starting Backup
12445 < Backup Completed - File Size = 80384 bytes
12445 > Backup Completed - File Size = 81408 bytes
12446   Restore Started
12447  
12448   Restore Completed
# Line 13315 | Line 13591 | DEPT_KEY_PATH = 000 (Charset = UTF8 Code
13591  
13592   Rows printed = 2
13593  
13594 < Current memory = 19,665,456
13594 > Current memory = 19,667,296
13595   Delta memory = 16,032
13596 < Max memory = 19,761,040
13597 < Elapsed time= 0.001 sec
13596 > Max memory = 19,762,880
13597 > Elapsed time= 0.002 sec
13598   Cpu = 0.000 sec
13599   Buffers = 2048
13600   Reads = 2
# Line 13583 | Line 13859 | DEPT_KEY_PATH = 000 (Charset = UTF8 Code
13859  
13860   Rows printed = 2
13861  
13862 < Current memory = 19,665,456
13862 > Current memory = 19,667,296
13863   Delta memory = 16,032
13864 < Max memory = 19,761,040
13864 > Max memory = 19,762,880
13865   Elapsed time= 0.102 sec
13866   Cpu = 0.000 sec
13867   Buffers = 2048
# Line 15204 | Line 15480 | Create Table LotsOfData (
15480      MyText VarChar(1024),
15481      Primary Key (RowID)
15482    );                
15483 < Loading data into database table. Started at 07/7/2021 11:46:17.204
15484 < Data load completed at 07/7/2021 11:48:00.164 Elapsed Time = 102960 ms, 100000 records loaded
15485 < MD5 checksum = 1c66cd114720b84a4fa21d01f8a0ba2b
15486 < Database Read started at 07/7/2021 11:48:00.174
15487 < Read Dataset completed at 07/7/2021 11:48:38.470 Elapsed Time = 38296 ms, 100000 records read
15488 < MD5 checksum = 1c66cd114720b84a4fa21d01f8a0ba2b
15483 > Loading data into database table. Started at 17/10/2021 23:28:45.143
15484 > Data load completed at 17/10/2021 23:30:25.163 Elapsed Time = 100020 ms, 100000 records loaded
15485 > Message Hash = 391fb63febbb58b57256c58708eeac65
15486 > Database Read started at 17/10/2021 23:30:25.174
15487 > Read Dataset completed at 17/10/2021 23:30:55.599 Elapsed Time = 30425 ms, 100000 records read
15488 > Message Hash = 391fb63febbb58b57256c58708eeac65
15489   Test Completed successfully
15490 < 07/7/2021 11:48:38.470 Test 21 passes as long as the MD5 sums are identical
15490 > 17/10/2021 23:30:55.599 Test 21 passes as long as the checksums are identical
15491  
15492  
15493   ------------------------------------------------------
# Line 16106 | Line 16382 | IBTable after create
16382  
16383   /* Table: TestTable, Owner: SYSDBA */
16384  
16385 < CREATE TABLE "TestTable"
16385 > CREATE TABLE "TestTable"
16386   (
16387          MYKEY   INTEGER NOT NULL,
16388          TEXTFIELD       VARCHAR(32) CHARACTER SET UTF8,
# Line 16847 | Line 17123 | SET AUTODDL ON;
17123  
17124   /* Table: DBVERSIONINFO, Owner: SYSDBA */
17125  
17126 < CREATE TABLE DBVERSIONINFO
17126 > CREATE TABLE DBVERSIONINFO
17127   (
17128          VERSIONNO       INTEGER NOT NULL,
17129   PRIMARY KEY (VERSIONNO)
# Line 16855 | Line 17131 | PRIMARY KEY (VERSIONNO)
17131  
17132   /* Table: IBDATASETTEST, Owner: SYSDBA */
17133  
17134 < CREATE TABLE IBDATASETTEST
17134 > CREATE TABLE IBDATASETTEST
17135   (
17136          KEYFIELD        INTEGER NOT NULL,
17137          PLAINTEXT       VARCHAR(128),
# Line 16872 | Line 17148 | COMMIT;
17148   /* Data Ends */
17149  
17150   CREATE SEQUENCE AGENERATOR;
17151 < ALTER SEQUENCE AGENERATOR RESTART WITH 0;
17152 < SET TERM ^ ;
17151 > ALTER SEQUENCE AGENERATOR RESTART WITH 1;
17152 > SET TERM ^;
17153  
17154  
17155   /* Triggers only will work for SQL triggers */
# Line 16884 | Line 17160 | As
17160   Begin
17161    new.ServerSideText = new.KeyField || ' - ' || new.PlainText;
17162   End
17163 < ^
17164 < COMMIT WORK ^
17163 > ^
17164 >
17165 > COMMIT WORK^
17166   SET TERM ;^
17167  
17168   /* Comments on System Objects */
# Line 17044 | Line 17321 | SET AUTODDL ON;
17321  
17322   /* Table: DBVERSIONINFO, Owner: SYSDBA */
17323  
17324 < CREATE TABLE DBVERSIONINFO
17324 > CREATE TABLE DBVERSIONINFO
17325   (
17326          VERSIONNO       INTEGER NOT NULL,
17327   PRIMARY KEY (VERSIONNO)
# Line 17052 | Line 17329 | PRIMARY KEY (VERSIONNO)
17329  
17330   /* Table: IBDATASETTEST, Owner: SYSDBA */
17331  
17332 < CREATE TABLE IBDATASETTEST
17332 > CREATE TABLE IBDATASETTEST
17333   (
17334          KEYFIELD        INTEGER NOT NULL,
17335          PLAINTEXT       VARCHAR(128),
# Line 17074 | Line 17351 | COMMIT;
17351   /* Data Ends */
17352  
17353   CREATE SEQUENCE AGENERATOR;
17354 < ALTER SEQUENCE AGENERATOR RESTART WITH 1;
17355 < SET TERM ^ ;
17354 > ALTER SEQUENCE AGENERATOR RESTART WITH 2;
17355 > SET TERM ^;
17356  
17357  
17358   /* Triggers only will work for SQL triggers */
# Line 17086 | Line 17363 | As
17363   Begin
17364    new.ServerSideText = new.KeyField || ' - ' || new.PlainText;
17365   End
17366 < ^
17367 < COMMIT WORK ^
17366 > ^
17367 >
17368 > COMMIT WORK^
17369   SET TERM ;^
17370  
17371   /* Comments on System Objects */
# Line 17231 | Line 17509 | SET AUTODDL ON;
17509  
17510   /* Table: DBVERSIONINFO, Owner: SYSDBA */
17511  
17512 < CREATE TABLE DBVERSIONINFO
17512 > CREATE TABLE DBVERSIONINFO
17513   (
17514          VERSIONNO       INTEGER NOT NULL,
17515   PRIMARY KEY (VERSIONNO)
# Line 17239 | Line 17517 | PRIMARY KEY (VERSIONNO)
17517  
17518   /* Table: IBDATASETTEST, Owner: SYSDBA */
17519  
17520 < CREATE TABLE IBDATASETTEST
17520 > CREATE TABLE IBDATASETTEST
17521   (
17522          KEYFIELD        INTEGER NOT NULL,
17523          PLAINTEXT       VARCHAR(128),
# Line 17262 | Line 17540 | COMMIT;
17540   /* Data Ends */
17541  
17542   CREATE SEQUENCE AGENERATOR;
17543 < ALTER SEQUENCE AGENERATOR RESTART WITH 2;
17544 < SET TERM ^ ;
17543 > ALTER SEQUENCE AGENERATOR RESTART WITH 3;
17544 > SET TERM ^;
17545  
17546  
17547   /* Triggers only will work for SQL triggers */
# Line 17274 | Line 17552 | As
17552   Begin
17553    new.ServerSideText = new.KeyField || ' - ' || new.PlainText;
17554   End
17555 < ^
17556 < COMMIT WORK ^
17555 > ^
17556 >
17557 > COMMIT WORK^
17558   SET TERM ;^
17559  
17560   /* Comments on System Objects */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines