641 |
|
|
642 |
|
Rows printed = 42 |
643 |
|
|
644 |
< |
Current memory = 19,686,512 |
644 |
> |
Current memory = 19,687,232 |
645 |
|
Delta memory = 16,384 |
646 |
< |
Max memory = 19,781,408 |
647 |
< |
Elapsed time= 0.015 sec |
648 |
< |
Cpu = 0.010 sec |
646 |
> |
Max memory = 19,781,872 |
647 |
> |
Elapsed time= 0.027 sec |
648 |
> |
Cpu = 0.020 sec |
649 |
|
Buffers = 2048 |
650 |
|
Reads = 2 |
651 |
|
Writes = 0 |
1445 |
|
isc_dpb_lc_ctype = UTF8 |
1446 |
|
|
1447 |
|
Before Disconnect |
1448 |
< |
inet://localhost/employee Disconnected after 20 ms |
1448 |
> |
inet://localhost/employee Disconnected after 34 ms |
1449 |
|
Before Connect |
1450 |
|
Connected to inet://localhost/employee |
1451 |
|
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 4041 ms |
1458 |
|
Idle Timer Expired for Test_Database_02 |
1459 |
|
Database Closed |
1460 |
|
Transaction Events |
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 |
1491 |
|
isc_tpb_read |
1492 |
|
|
1493 |
|
Transaction Ending |
1494 |
< |
Transaction Ended after 1999 ms |
1494 |
> |
Transaction Ended after 2000 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 2047 ms |
1498 |
|
SQL Dialect Downgrade test |
1499 |
|
Before Connect |
1500 |
|
Connected to inet://localhost//tmp/ibx-testsuite/testsuite1.fdb |
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 25 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 |
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 22 ms |
1520 |
|
|
1521 |
|
|
1522 |
|
------------------------------------------------------ |
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 |
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 = 19501920 |
1547 |
|
Forced Writes Enabled |
1548 |
< |
Max Memory = 19627808 |
1548 |
> |
Max Memory = 19628528 |
1549 |
|
Number of Buffers = 2048 |
1550 |
|
Sweep Interval = 20000 |
1551 |
|
User Names: SYSDBA |
1552 |
< |
Fetches = 1840 |
1552 |
> |
Fetches = 1847 |
1553 |
|
Marks = 8 |
1554 |
< |
Reads = 99 |
1554 |
> |
Reads = 100 |
1555 |
|
Writes = 2 |
1556 |
|
Pages Free = 310 |
1557 |
< |
Pages Used = 36 |
1557 |
> |
Pages Used = 765 |
1558 |
|
Transaction Count = 1 |
1559 |
|
|
1560 |
|
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 = 811 |
1569 |
|
RDB$GENERATORS = 5 |
1570 |
|
RDB$CHARACTER_SETS = 2 |
1571 |
|
RDB$COLLATIONS = 2 |
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; |
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,667,952 |
3301 |
|
Delta memory = 16,416 |
3302 |
< |
Max memory = 19,762,896 |
3302 |
> |
Max memory = 19,763,360 |
3303 |
|
Elapsed time= 0.026 sec |
3304 |
< |
Cpu = 0.020 sec |
3304 |
> |
Cpu = 0.010 sec |
3305 |
|
Buffers = 2048 |
3306 |
|
Reads = 2 |
3307 |
|
Writes = 0 |
3543 |
|
-Reassign the sales records before deleting this employee. |
3544 |
|
-At procedure 'DELETE_EMPLOYEE' line: 19, col: 3 |
3545 |
|
|
3546 |
+ |
Scollable Cursors |
3547 |
+ |
Do Fetch Next: |
3548 |
+ |
EMP_NO = 2 |
3549 |
+ |
FIRST_NAME = Robert |
3550 |
+ |
LAST_NAME = Nelson |
3551 |
+ |
PHONE_EXT = 250 |
3552 |
+ |
HIRE_DATE = 1988/12/28 00:00:00.0000 |
3553 |
+ |
DEPT_NO = 600 |
3554 |
+ |
JOB_CODE = VP |
3555 |
+ |
JOB_GRADE = 2 |
3556 |
+ |
JOB_COUNTRY = USA |
3557 |
+ |
SALARY = 105,900.00 |
3558 |
+ |
FULL_NAME = Nelson, Robert |
3559 |
+ |
Do Fetch Last: |
3560 |
+ |
EMP_NO = 145 |
3561 |
+ |
FIRST_NAME = Mark |
3562 |
+ |
LAST_NAME = Guckenheimer |
3563 |
+ |
PHONE_EXT = 221 |
3564 |
+ |
HIRE_DATE = 1994/05/02 00:00:00.0000 |
3565 |
+ |
DEPT_NO = 622 |
3566 |
+ |
JOB_CODE = Eng |
3567 |
+ |
JOB_GRADE = 5 |
3568 |
+ |
JOB_COUNTRY = USA |
3569 |
+ |
SALARY = 32,000.00 |
3570 |
+ |
FULL_NAME = Guckenheimer, Mark |
3571 |
+ |
Do Fetch Prior: |
3572 |
+ |
EMP_NO = 144 |
3573 |
+ |
FIRST_NAME = John |
3574 |
+ |
LAST_NAME = Montgomery |
3575 |
+ |
PHONE_EXT = 820 |
3576 |
+ |
HIRE_DATE = 1994/03/30 00:00:00.0000 |
3577 |
+ |
DEPT_NO = 672 |
3578 |
+ |
JOB_CODE = Eng |
3579 |
+ |
JOB_GRADE = 5 |
3580 |
+ |
JOB_COUNTRY = USA |
3581 |
+ |
SALARY = 35,000.00 |
3582 |
+ |
FULL_NAME = Montgomery, John |
3583 |
+ |
Do Fetch First: |
3584 |
+ |
EMP_NO = 2 |
3585 |
+ |
FIRST_NAME = Robert |
3586 |
+ |
LAST_NAME = Nelson |
3587 |
+ |
PHONE_EXT = 250 |
3588 |
+ |
HIRE_DATE = 1988/12/28 00:00:00.0000 |
3589 |
+ |
DEPT_NO = 600 |
3590 |
+ |
JOB_CODE = VP |
3591 |
+ |
JOB_GRADE = 2 |
3592 |
+ |
JOB_COUNTRY = USA |
3593 |
+ |
SALARY = 105,900.00 |
3594 |
+ |
FULL_NAME = Nelson, Robert |
3595 |
+ |
Do Fetch Abs 8 : |
3596 |
+ |
EMP_NO = 14 |
3597 |
+ |
FIRST_NAME = Stewart |
3598 |
+ |
LAST_NAME = Hall |
3599 |
+ |
PHONE_EXT = 227 |
3600 |
+ |
HIRE_DATE = 1990/06/04 00:00:00.0000 |
3601 |
+ |
DEPT_NO = 900 |
3602 |
+ |
JOB_CODE = Finan |
3603 |
+ |
JOB_GRADE = 3 |
3604 |
+ |
JOB_COUNTRY = USA |
3605 |
+ |
SALARY = 69,482.63 |
3606 |
+ |
FULL_NAME = Hall, Stewart |
3607 |
+ |
Do Fetch Relative -2 : |
3608 |
+ |
EMP_NO = 11 |
3609 |
+ |
FIRST_NAME = K. J. |
3610 |
+ |
LAST_NAME = Weston |
3611 |
+ |
PHONE_EXT = 34 |
3612 |
+ |
HIRE_DATE = 1990/01/17 00:00:00.0000 |
3613 |
+ |
DEPT_NO = 130 |
3614 |
+ |
JOB_CODE = SRep |
3615 |
+ |
JOB_GRADE = 4 |
3616 |
+ |
JOB_COUNTRY = USA |
3617 |
+ |
SALARY = 86,292.94 |
3618 |
+ |
FULL_NAME = Weston, K. J. |
3619 |
+ |
Do Fetch beyond EOF : |
3620 |
+ |
Fetch returned false |
3621 |
+ |
|
3622 |
|
|
3623 |
|
------------------------------------------------------ |
3624 |
|
Running Test 08: TIBDataset: Locate, Bookmark and Lookup |
3978 |
|
/* Domain definitions */ |
3979 |
|
|
3980 |
|
CREATE DOMAIN ADDRESSLINE AS VARCHAR(30); |
3981 |
< |
CREATE DOMAIN BUDGET AS DECIMAL(12, 2) |
3981 |
> |
CREATE DOMAIN BUDGET AS DECIMAL(12,2) |
3982 |
|
DEFAULT 50000; |
3983 |
|
CREATE DOMAIN COUNTRYNAME AS VARCHAR(15); |
3984 |
|
CREATE DOMAIN CUSTNO AS INTEGER; |
3993 |
|
CREATE DOMAIN PRODTYPE AS VARCHAR(12) |
3994 |
|
DEFAULT 'software' NOT NULL; |
3995 |
|
CREATE DOMAIN PROJNO AS CHAR(5); |
3996 |
< |
CREATE DOMAIN SALARY AS NUMERIC(10, 2) |
3996 |
> |
CREATE DOMAIN SALARY AS NUMERIC(10,2) |
3997 |
|
DEFAULT 0; |
3998 |
|
|
3999 |
|
/* Table: COUNTRY, Owner: SYSDBA */ |
4000 |
|
|
4001 |
< |
CREATE TABLE COUNTRY |
4001 |
> |
CREATE TABLE COUNTRY |
4002 |
|
( |
4003 |
|
COUNTRY COUNTRYNAME NOT NULL, |
4004 |
|
CURRENCY VARCHAR(10) NOT NULL, |
4007 |
|
|
4008 |
|
/* Table: CUSTOMER, Owner: SYSDBA */ |
4009 |
|
|
4010 |
< |
CREATE TABLE CUSTOMER |
4010 |
> |
CREATE TABLE CUSTOMER |
4011 |
|
( |
4012 |
|
CUST_NO CUSTNO NOT NULL, |
4013 |
|
CUSTOMER VARCHAR(25) NOT NULL, |
4026 |
|
|
4027 |
|
/* Table: DEPARTMENT, Owner: SYSDBA */ |
4028 |
|
|
4029 |
< |
CREATE TABLE DEPARTMENT |
4029 |
> |
CREATE TABLE DEPARTMENT |
4030 |
|
( |
4031 |
|
DEPT_NO DEPTNO NOT NULL, |
4032 |
|
DEPARTMENT VARCHAR(25) NOT NULL, |
4041 |
|
|
4042 |
|
/* Table: EMPLOYEE, Owner: SYSDBA */ |
4043 |
|
|
4044 |
< |
CREATE TABLE EMPLOYEE |
4044 |
> |
CREATE TABLE EMPLOYEE |
4045 |
|
( |
4046 |
|
EMP_NO EMPNO NOT NULL, |
4047 |
|
FIRST_NAME FIRSTNAME NOT NULL, |
4059 |
|
|
4060 |
|
/* Table: EMPLOYEE_PROJECT, Owner: SYSDBA */ |
4061 |
|
|
4062 |
< |
CREATE TABLE EMPLOYEE_PROJECT |
4062 |
> |
CREATE TABLE EMPLOYEE_PROJECT |
4063 |
|
( |
4064 |
|
EMP_NO EMPNO NOT NULL, |
4065 |
|
PROJ_ID PROJNO NOT NULL, |
4068 |
|
|
4069 |
|
/* Table: JOB, Owner: SYSDBA */ |
4070 |
|
|
4071 |
< |
CREATE TABLE JOB |
4071 |
> |
CREATE TABLE JOB |
4072 |
|
( |
4073 |
|
JOB_CODE JOBCODE NOT NULL, |
4074 |
|
JOB_GRADE JOBGRADE NOT NULL, |
4083 |
|
|
4084 |
|
/* Table: PROJECT, Owner: SYSDBA */ |
4085 |
|
|
4086 |
< |
CREATE TABLE PROJECT |
4086 |
> |
CREATE TABLE PROJECT |
4087 |
|
( |
4088 |
|
PROJ_ID PROJNO NOT NULL, |
4089 |
|
PROJ_NAME VARCHAR(20) NOT NULL, |
4096 |
|
|
4097 |
|
/* Table: PROJ_DEPT_BUDGET, Owner: SYSDBA */ |
4098 |
|
|
4099 |
< |
CREATE TABLE PROJ_DEPT_BUDGET |
4099 |
> |
CREATE TABLE PROJ_DEPT_BUDGET |
4100 |
|
( |
4101 |
|
FISCAL_YEAR INTEGER NOT NULL, |
4102 |
|
PROJ_ID PROJNO NOT NULL, |
4108 |
|
|
4109 |
|
/* Table: SALARY_HISTORY, Owner: SYSDBA */ |
4110 |
|
|
4111 |
< |
CREATE TABLE SALARY_HISTORY |
4111 |
> |
CREATE TABLE SALARY_HISTORY |
4112 |
|
( |
4113 |
|
EMP_NO EMPNO NOT NULL, |
4114 |
|
CHANGE_DATE TIMESTAMP DEFAULT 'NOW' NOT NULL, |
4121 |
|
|
4122 |
|
/* Table: SALES, Owner: SYSDBA */ |
4123 |
|
|
4124 |
< |
CREATE TABLE SALES |
4124 |
> |
CREATE TABLE SALES |
4125 |
|
( |
4126 |
|
PO_NUMBER PONUMBER NOT NULL, |
4127 |
|
CUST_NO CUSTNO NOT NULL, |
4132 |
|
DATE_NEEDED TIMESTAMP, |
4133 |
|
PAID CHAR(1) DEFAULT 'n', |
4134 |
|
QTY_ORDERED INTEGER DEFAULT 1 NOT NULL, |
4135 |
< |
TOTAL_VALUE DECIMAL(9, 2) NOT NULL, |
4135 |
> |
TOTAL_VALUE DECIMAL(9,2) NOT NULL, |
4136 |
|
DISCOUNT FLOAT DEFAULT 0 NOT NULL, |
4137 |
|
ITEM_TYPE PRODTYPE, |
4138 |
|
AGED COMPUTED BY (ship_date - order_date), |
4174 |
|
/* View: PHONE_LIST, Owner: SYSDBA */ |
4175 |
|
|
4176 |
|
CREATE VIEW PHONE_LIST ( |
4177 |
< |
EMP_NO, |
4178 |
< |
FIRST_NAME, |
4179 |
< |
LAST_NAME, |
4180 |
< |
PHONE_EXT, |
4181 |
< |
LOCATION, |
4177 |
> |
EMP_NO, |
4178 |
> |
FIRST_NAME, |
4179 |
> |
LAST_NAME, |
4180 |
> |
PHONE_EXT, |
4181 |
> |
LOCATION, |
4182 |
|
PHONE_NO |
4183 |
|
) AS |
4184 |
|
SELECT |
4276 |
|
CREATE EXCEPTION UNKNOWN_EMP_ID 'Invalid employee number or project id.'; |
4277 |
|
COMMIT WORK; |
4278 |
|
SET AUTODDL OFF; |
4279 |
< |
SET TERM ^ ; |
4279 |
> |
SET TERM ^; |
4280 |
|
|
4281 |
|
/* Stored procedures Definitions*/ |
4282 |
|
|
4283 |
< |
CREATE PROCEDURE SHOW_LANGS |
4283 |
> |
CREATE PROCEDURE SHOW_LANGS |
4284 |
|
( |
4285 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
4286 |
|
GRADE SMALLINT, |
4292 |
|
) |
4293 |
|
AS |
4294 |
|
BEGIN SUSPEND; EXIT; END |
4219 |
– |
|
4295 |
|
^ |
4296 |
|
|
4297 |
< |
CREATE PROCEDURE ADD_EMP_PROJ |
4297 |
> |
CREATE PROCEDURE ADD_EMP_PROJ |
4298 |
|
( |
4299 |
|
EMP_NO SMALLINT, |
4300 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
4301 |
|
) |
4302 |
|
AS |
4303 |
|
BEGIN EXIT; END |
4229 |
– |
|
4304 |
|
^ |
4305 |
|
|
4306 |
< |
CREATE PROCEDURE ALL_LANGS |
4306 |
> |
CREATE PROCEDURE ALL_LANGS |
4307 |
|
RETURNS |
4308 |
|
( |
4309 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
4313 |
|
) |
4314 |
|
AS |
4315 |
|
BEGIN SUSPEND; EXIT; END |
4242 |
– |
|
4316 |
|
^ |
4317 |
|
|
4318 |
< |
CREATE PROCEDURE DELETE_EMPLOYEE |
4318 |
> |
CREATE PROCEDURE DELETE_EMPLOYEE |
4319 |
|
( |
4320 |
|
EMP_NUM INTEGER |
4321 |
|
) |
4322 |
|
AS |
4323 |
|
BEGIN EXIT; END |
4251 |
– |
|
4324 |
|
^ |
4325 |
|
|
4326 |
< |
CREATE PROCEDURE DEPT_BUDGET |
4326 |
> |
CREATE PROCEDURE DEPT_BUDGET |
4327 |
|
( |
4328 |
|
DNO CHAR(3) CHARACTER SET NONE |
4329 |
|
) |
4330 |
|
RETURNS |
4331 |
|
( |
4332 |
< |
TOT DECIMAL(12, 2) |
4332 |
> |
TOT DECIMAL(12,2) |
4333 |
|
) |
4334 |
|
AS |
4335 |
|
BEGIN SUSPEND; EXIT; END |
4264 |
– |
|
4336 |
|
^ |
4337 |
|
|
4338 |
< |
CREATE PROCEDURE GET_EMP_PROJ |
4338 |
> |
CREATE PROCEDURE GET_EMP_PROJ |
4339 |
|
( |
4340 |
|
EMP_NO SMALLINT |
4341 |
|
) |
4345 |
|
) |
4346 |
|
AS |
4347 |
|
BEGIN SUSPEND; EXIT; END |
4277 |
– |
|
4348 |
|
^ |
4349 |
|
|
4350 |
< |
CREATE PROCEDURE MAIL_LABEL |
4350 |
> |
CREATE PROCEDURE MAIL_LABEL |
4351 |
|
( |
4352 |
|
CUST_NO INTEGER |
4353 |
|
) |
4362 |
|
) |
4363 |
|
AS |
4364 |
|
BEGIN SUSPEND; EXIT; END |
4295 |
– |
|
4365 |
|
^ |
4366 |
|
|
4367 |
< |
CREATE PROCEDURE ORG_CHART |
4367 |
> |
CREATE PROCEDURE ORG_CHART |
4368 |
|
RETURNS |
4369 |
|
( |
4370 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
4375 |
|
) |
4376 |
|
AS |
4377 |
|
BEGIN SUSPEND; EXIT; END |
4309 |
– |
|
4378 |
|
^ |
4379 |
|
|
4380 |
< |
CREATE PROCEDURE SHIP_ORDER |
4380 |
> |
CREATE PROCEDURE SHIP_ORDER |
4381 |
|
( |
4382 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
4383 |
|
) |
4384 |
|
AS |
4385 |
|
BEGIN EXIT; END |
4318 |
– |
|
4386 |
|
^ |
4387 |
|
|
4388 |
< |
CREATE PROCEDURE SUB_TOT_BUDGET |
4388 |
> |
CREATE PROCEDURE SUB_TOT_BUDGET |
4389 |
|
( |
4390 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
4391 |
|
) |
4392 |
|
RETURNS |
4393 |
|
( |
4394 |
< |
TOT_BUDGET DECIMAL(12, 2), |
4395 |
< |
AVG_BUDGET DECIMAL(12, 2), |
4396 |
< |
MIN_BUDGET DECIMAL(12, 2), |
4397 |
< |
MAX_BUDGET DECIMAL(12, 2) |
4394 |
> |
TOT_BUDGET DECIMAL(12,2), |
4395 |
> |
AVG_BUDGET DECIMAL(12,2), |
4396 |
> |
MIN_BUDGET DECIMAL(12,2), |
4397 |
> |
MAX_BUDGET DECIMAL(12,2) |
4398 |
|
) |
4399 |
|
AS |
4400 |
|
BEGIN SUSPEND; EXIT; END |
4334 |
– |
|
4401 |
|
^ |
4402 |
|
|
4403 |
< |
SET TERM ; ^ |
4403 |
> |
SET TERM ;^ |
4404 |
|
COMMIT WORK; |
4405 |
|
SET AUTODDL ON; |
4406 |
< |
SET TERM ^ ; |
4406 |
> |
SET TERM ^; |
4407 |
|
|
4408 |
|
|
4409 |
|
/* Triggers only will work for SQL triggers */ |
4415 |
|
if (new.cust_no is null) then |
4416 |
|
new.cust_no = gen_id(cust_no_gen, 1); |
4417 |
|
END |
4418 |
< |
^ |
4418 |
> |
^ |
4419 |
> |
|
4420 |
|
CREATE TRIGGER SET_EMP_NO FOR EMPLOYEE |
4421 |
|
ACTIVE BEFORE INSERT POSITION 0 |
4422 |
|
AS |
4424 |
|
if (new.emp_no is null) then |
4425 |
|
new.emp_no = gen_id(emp_no_gen, 1); |
4426 |
|
END |
4427 |
< |
^ |
4427 |
> |
^ |
4428 |
> |
|
4429 |
|
CREATE TRIGGER SAVE_SALARY_CHANGE FOR EMPLOYEE |
4430 |
|
ACTIVE AFTER UPDATE POSITION 0 |
4431 |
|
AS |
4440 |
|
old.salary, |
4441 |
|
(new.salary - old.salary) * 100 / old.salary); |
4442 |
|
END |
4443 |
< |
^ |
4443 |
> |
^ |
4444 |
> |
|
4445 |
|
CREATE TRIGGER POST_NEW_ORDER FOR SALES |
4446 |
|
ACTIVE AFTER INSERT POSITION 0 |
4447 |
|
AS |
4448 |
|
BEGIN |
4449 |
|
POST_EVENT 'new_order'; |
4450 |
|
END |
4451 |
< |
^ |
4452 |
< |
COMMIT WORK ^ |
4451 |
> |
^ |
4452 |
> |
|
4453 |
> |
COMMIT WORK^ |
4454 |
|
SET TERM ;^ |
4455 |
|
COMMIT WORK; |
4456 |
|
SET AUTODDL OFF; |
4457 |
< |
SET TERM ^ ; |
4457 |
> |
SET TERM ^; |
4458 |
|
|
4459 |
|
/* Stored procedure Bodies */ |
4460 |
|
|
4461 |
< |
|
4392 |
< |
ALTER PROCEDURE SHOW_LANGS |
4461 |
> |
ALTER PROCEDURE SHOW_LANGS |
4462 |
|
( |
4463 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
4464 |
|
GRADE SMALLINT, |
4484 |
|
SUSPEND; |
4485 |
|
END |
4486 |
|
END |
4487 |
< |
^ |
4419 |
< |
|
4487 |
> |
^ |
4488 |
|
|
4489 |
< |
ALTER PROCEDURE ADD_EMP_PROJ |
4489 |
> |
ALTER PROCEDURE ADD_EMP_PROJ |
4490 |
|
( |
4491 |
|
EMP_NO SMALLINT, |
4492 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
4499 |
|
EXCEPTION unknown_emp_id; |
4500 |
|
END |
4501 |
|
END |
4502 |
< |
^ |
4435 |
< |
|
4502 |
> |
^ |
4503 |
|
|
4504 |
< |
ALTER PROCEDURE ALL_LANGS |
4504 |
> |
ALTER PROCEDURE ALL_LANGS |
4505 |
|
RETURNS |
4506 |
|
( |
4507 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
4527 |
|
SUSPEND; |
4528 |
|
END |
4529 |
|
END |
4530 |
< |
^ |
4464 |
< |
|
4530 |
> |
^ |
4531 |
|
|
4532 |
< |
ALTER PROCEDURE DELETE_EMPLOYEE |
4532 |
> |
ALTER PROCEDURE DELETE_EMPLOYEE |
4533 |
|
( |
4534 |
|
EMP_NUM INTEGER |
4535 |
|
) |
4585 |
|
DELETE FROM employee |
4586 |
|
WHERE emp_no = :emp_num; |
4587 |
|
END |
4588 |
< |
^ |
4523 |
< |
|
4588 |
> |
^ |
4589 |
|
|
4590 |
< |
ALTER PROCEDURE DEPT_BUDGET |
4590 |
> |
ALTER PROCEDURE DEPT_BUDGET |
4591 |
|
( |
4592 |
|
DNO CHAR(3) CHARACTER SET NONE |
4593 |
|
) |
4594 |
|
RETURNS |
4595 |
|
( |
4596 |
< |
TOT DECIMAL(12, 2) |
4596 |
> |
TOT DECIMAL(12,2) |
4597 |
|
) |
4598 |
|
AS |
4599 |
|
DECLARE VARIABLE sumb DECIMAL(12, 2); |
4621 |
|
|
4622 |
|
SUSPEND; |
4623 |
|
END |
4624 |
< |
^ |
4560 |
< |
|
4624 |
> |
^ |
4625 |
|
|
4626 |
< |
ALTER PROCEDURE GET_EMP_PROJ |
4626 |
> |
ALTER PROCEDURE GET_EMP_PROJ |
4627 |
|
( |
4628 |
|
EMP_NO SMALLINT |
4629 |
|
) |
4640 |
|
DO |
4641 |
|
SUSPEND; |
4642 |
|
END |
4643 |
< |
^ |
4580 |
< |
|
4643 |
> |
^ |
4644 |
|
|
4645 |
< |
ALTER PROCEDURE MAIL_LABEL |
4645 |
> |
ALTER PROCEDURE MAIL_LABEL |
4646 |
|
( |
4647 |
|
CUST_NO INTEGER |
4648 |
|
) |
4710 |
|
|
4711 |
|
SUSPEND; |
4712 |
|
END |
4713 |
< |
^ |
4651 |
< |
|
4713 |
> |
^ |
4714 |
|
|
4715 |
< |
ALTER PROCEDURE ORG_CHART |
4715 |
> |
ALTER PROCEDURE ORG_CHART |
4716 |
|
RETURNS |
4717 |
|
( |
4718 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
4752 |
|
SUSPEND; |
4753 |
|
END |
4754 |
|
END |
4755 |
< |
^ |
4694 |
< |
|
4755 |
> |
^ |
4756 |
|
|
4757 |
< |
ALTER PROCEDURE SHIP_ORDER |
4757 |
> |
ALTER PROCEDURE SHIP_ORDER |
4758 |
|
( |
4759 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
4760 |
|
) |
4805 |
|
SET order_status = 'shipped', ship_date = 'NOW' |
4806 |
|
WHERE po_number = :po_num; |
4807 |
|
END |
4808 |
< |
^ |
4748 |
< |
|
4808 |
> |
^ |
4809 |
|
|
4810 |
< |
ALTER PROCEDURE SUB_TOT_BUDGET |
4810 |
> |
ALTER PROCEDURE SUB_TOT_BUDGET |
4811 |
|
( |
4812 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
4813 |
|
) |
4814 |
|
RETURNS |
4815 |
|
( |
4816 |
< |
TOT_BUDGET DECIMAL(12, 2), |
4817 |
< |
AVG_BUDGET DECIMAL(12, 2), |
4818 |
< |
MIN_BUDGET DECIMAL(12, 2), |
4819 |
< |
MAX_BUDGET DECIMAL(12, 2) |
4816 |
> |
TOT_BUDGET DECIMAL(12,2), |
4817 |
> |
AVG_BUDGET DECIMAL(12,2), |
4818 |
> |
MIN_BUDGET DECIMAL(12,2), |
4819 |
> |
MAX_BUDGET DECIMAL(12,2) |
4820 |
|
) |
4821 |
|
AS |
4822 |
|
BEGIN |
4826 |
|
INTO :tot_budget, :avg_budget, :min_budget, :max_budget; |
4827 |
|
SUSPEND; |
4828 |
|
END |
4829 |
< |
^ |
4829 |
> |
^ |
4830 |
|
|
4831 |
< |
SET TERM ; ^ |
4831 |
> |
SET TERM ;^ |
4832 |
|
COMMIT WORK; |
4833 |
|
SET AUTODDL ON; |
4834 |
|
|
4872 |
|
|
4873 |
|
CREATE DATABASE 'inet://localhost//tmp/ibx-testsuite/testsuite1.fdb' PAGE_SIZE 8192 |
4874 |
|
|
4875 |
< |
DEFAULT CHARACTER SET NONE; |
4875 |
> |
DEFAULT CHARACTER SET NONE; |
4876 |
|
COMMENT ON DATABASE IS 'Employee Test DB'; |
4877 |
|
|
4878 |
|
/* Domain definitions */ |
4879 |
|
|
4880 |
|
CREATE DOMAIN ADDRESSLINE AS VARCHAR(30); |
4881 |
< |
CREATE DOMAIN BUDGET AS DECIMAL(12, 2) |
4881 |
> |
CREATE DOMAIN BUDGET AS DECIMAL(12,2) |
4882 |
|
DEFAULT 50000; |
4883 |
|
CREATE DOMAIN COUNTRYNAME AS VARCHAR(15); |
4884 |
|
CREATE DOMAIN CUSTNO AS INTEGER; |
4894 |
|
CREATE DOMAIN PRODTYPE AS VARCHAR(12) |
4895 |
|
DEFAULT 'software' NOT NULL; |
4896 |
|
CREATE DOMAIN PROJNO AS CHAR(5); |
4897 |
< |
CREATE DOMAIN SALARY AS NUMERIC(10, 2) |
4897 |
> |
CREATE DOMAIN SALARY AS NUMERIC(10,2) |
4898 |
|
DEFAULT 0; |
4899 |
|
|
4900 |
|
/* Table: COUNTRIES, Owner: SYSDBA */ |
4901 |
|
|
4902 |
< |
CREATE TABLE COUNTRIES |
4902 |
> |
CREATE TABLE COUNTRIES |
4903 |
|
( |
4904 |
|
COUNTRY VARCHAR(64) NOT NULL, |
4905 |
|
NONEU SMALLINT, |
4912 |
|
|
4913 |
|
/* Table: COUNTRY, Owner: SYSDBA */ |
4914 |
|
|
4915 |
< |
CREATE TABLE COUNTRY |
4915 |
> |
CREATE TABLE COUNTRY |
4916 |
|
( |
4917 |
|
COUNTRY COUNTRYNAME NOT NULL, |
4918 |
|
CURRENCY VARCHAR(10) NOT NULL, |
4921 |
|
|
4922 |
|
/* Table: CUSTOMER, Owner: SYSDBA */ |
4923 |
|
|
4924 |
< |
CREATE TABLE CUSTOMER |
4924 |
> |
CREATE TABLE CUSTOMER |
4925 |
|
( |
4926 |
|
CUST_NO CUSTNO NOT NULL, |
4927 |
|
CUSTOMER VARCHAR(25) NOT NULL, |
4941 |
|
|
4942 |
|
/* Table: DEPARTMENT, Owner: SYSDBA */ |
4943 |
|
|
4944 |
< |
CREATE TABLE DEPARTMENT |
4944 |
> |
CREATE TABLE DEPARTMENT |
4945 |
|
( |
4946 |
|
DEPT_NO DEPTNO NOT NULL, |
4947 |
|
DEPARTMENT VARCHAR(25) NOT NULL, |
4956 |
|
|
4957 |
|
/* Table: EMPLOYEE, Owner: SYSDBA */ |
4958 |
|
|
4959 |
< |
CREATE TABLE EMPLOYEE |
4959 |
> |
CREATE TABLE EMPLOYEE |
4960 |
|
( |
4961 |
|
EMP_NO EMPNO NOT NULL, |
4962 |
|
FIRST_NAME FIRSTNAME NOT NULL, |
4974 |
|
|
4975 |
|
/* Table: EMPLOYEE_PROJECT, Owner: SYSDBA */ |
4976 |
|
|
4977 |
< |
CREATE TABLE EMPLOYEE_PROJECT |
4977 |
> |
CREATE TABLE EMPLOYEE_PROJECT |
4978 |
|
( |
4979 |
|
EMP_NO EMPNO NOT NULL, |
4980 |
|
PROJ_ID PROJNO NOT NULL, |
4983 |
|
|
4984 |
|
/* Table: FB$OUT_TABLE, Owner: SYSDBA */ |
4985 |
|
|
4986 |
< |
CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE |
4986 |
> |
CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE |
4987 |
|
( |
4988 |
|
LINE_NUM INTEGER, |
4989 |
|
CONTENT FB$OUT_TYPE |
4991 |
|
|
4992 |
|
/* Table: ITEST, Owner: SYSDBA */ |
4993 |
|
|
4994 |
< |
CREATE TABLE ITEST |
4994 |
> |
CREATE TABLE ITEST |
4995 |
|
( |
4996 |
|
"KEY" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0) NOT NULL, |
4997 |
|
SOMETEXT VARCHAR(64), |
5000 |
|
|
5001 |
|
/* Table: ITEST2, Owner: SYSDBA */ |
5002 |
|
|
5003 |
< |
CREATE TABLE ITEST2 |
5003 |
> |
CREATE TABLE ITEST2 |
5004 |
|
( |
5005 |
|
"KEY" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL, |
5006 |
|
SOMETEXT VARCHAR(64), |
5009 |
|
|
5010 |
|
/* Table: JOB, Owner: SYSDBA */ |
5011 |
|
|
5012 |
< |
CREATE TABLE JOB |
5012 |
> |
CREATE TABLE JOB |
5013 |
|
( |
5014 |
|
JOB_CODE JOBCODE NOT NULL, |
5015 |
|
JOB_GRADE JOBGRADE NOT NULL, |
5024 |
|
|
5025 |
|
/* Table: PROJECT, Owner: SYSDBA */ |
5026 |
|
|
5027 |
< |
CREATE TABLE PROJECT |
5027 |
> |
CREATE TABLE PROJECT |
5028 |
|
( |
5029 |
|
PROJ_ID PROJNO NOT NULL, |
5030 |
|
PROJ_NAME VARCHAR(20) NOT NULL, |
5037 |
|
|
5038 |
|
/* Table: PROJ_DEPT_BUDGET, Owner: SYSDBA */ |
5039 |
|
|
5040 |
< |
CREATE TABLE PROJ_DEPT_BUDGET |
5040 |
> |
CREATE TABLE PROJ_DEPT_BUDGET |
5041 |
|
( |
5042 |
|
FISCAL_YEAR INTEGER NOT NULL, |
5043 |
|
PROJ_ID PROJNO NOT NULL, |
5049 |
|
|
5050 |
|
/* Table: SALARY_HISTORY, Owner: SYSDBA */ |
5051 |
|
|
5052 |
< |
CREATE TABLE SALARY_HISTORY |
5052 |
> |
CREATE TABLE SALARY_HISTORY |
5053 |
|
( |
5054 |
|
EMP_NO EMPNO NOT NULL, |
5055 |
|
CHANGE_DATE TIMESTAMP DEFAULT 'NOW' NOT NULL, |
5062 |
|
|
5063 |
|
/* Table: SALES, Owner: SYSDBA */ |
5064 |
|
|
5065 |
< |
CREATE TABLE SALES |
5065 |
> |
CREATE TABLE SALES |
5066 |
|
( |
5067 |
|
PO_NUMBER PONUMBER NOT NULL, |
5068 |
|
CUST_NO CUSTNO NOT NULL, |
5073 |
|
DATE_NEEDED TIMESTAMP, |
5074 |
|
PAID CHAR(1) DEFAULT 'n', |
5075 |
|
QTY_ORDERED INTEGER DEFAULT 1 NOT NULL, |
5076 |
< |
TOTAL_VALUE DECIMAL(9, 2) NOT NULL, |
5076 |
> |
TOTAL_VALUE DECIMAL(9,2) NOT NULL, |
5077 |
|
DISCOUNT FLOAT DEFAULT 0 NOT NULL, |
5078 |
|
ITEM_TYPE PRODTYPE, |
5079 |
|
AGED COMPUTED BY (ship_date - order_date), |
5086 |
|
TIMESTAMP, INTEGER |
5087 |
|
RETURNS TIMESTAMP |
5088 |
|
ENTRY_POINT 'addDay' MODULE_NAME 'fbudf' |
5029 |
– |
|
5089 |
|
; |
5090 |
|
|
5091 |
|
|
5092 |
|
DECLARE EXTERNAL FUNCTION I64TRUNCATE |
5093 |
< |
NUMERIC(18, 0) BY DESCRIPTOR, NUMERIC(18, 0) BY DESCRIPTOR |
5093 |
> |
NUMERIC(18,0) BY DESCRIPTOR, NUMERIC(18,0) BY DESCRIPTOR |
5094 |
|
RETURNS PARAMETER 2 |
5095 |
|
ENTRY_POINT 'fbtruncate' MODULE_NAME 'fbudf' |
5037 |
– |
|
5096 |
|
; |
5097 |
|
|
5098 |
|
|
5100 |
|
TIMESTAMP, INTEGER NULL, CSTRING(10) CHARACTER SET NONE, CSTRING(10) CHARACTER SET NONE BY DESCRIPTOR |
5101 |
|
RETURNS CSTRING(32) CHARACTER SET NONE FREE_IT |
5102 |
|
ENTRY_POINT 'testit' MODULE_NAME 'fbudf' |
5045 |
– |
|
5103 |
|
; |
5104 |
|
|
5105 |
|
|
5841 |
|
/* View: DEPTLIST, Owner: SYSDBA */ |
5842 |
|
|
5843 |
|
CREATE VIEW DEPTLIST ( |
5844 |
< |
EMP_NO, |
5845 |
< |
FIRST_NAME, |
5846 |
< |
LAST_NAME, |
5847 |
< |
PHONE_EXT, |
5848 |
< |
HIRE_DATE, |
5849 |
< |
DEPT_NO, |
5850 |
< |
JOB_CODE, |
5851 |
< |
JOB_GRADE, |
5852 |
< |
JOB_COUNTRY, |
5853 |
< |
SALARY, |
5854 |
< |
FULL_NAME, |
5855 |
< |
DEPT_PATH, |
5856 |
< |
DEPT_KEY_PATH |
5844 |
> |
EMP_NO, |
5845 |
> |
FIRST_NAME, |
5846 |
> |
LAST_NAME, |
5847 |
> |
PHONE_EXT, |
5848 |
> |
HIRE_DATE, |
5849 |
> |
DEPT_NO, |
5850 |
> |
JOB_CODE, |
5851 |
> |
JOB_GRADE, |
5852 |
> |
JOB_COUNTRY, |
5853 |
> |
SALARY, |
5854 |
> |
FULL_NAME, |
5855 |
> |
DEPT_PATH, |
5856 |
> |
DEPT_KEY_PATH, |
5857 |
> |
"Payment Status" |
5858 |
|
) AS |
5859 |
|
with recursive Depts As ( |
5860 |
|
Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar(256)) as DEPT_PATH, |
5868 |
|
) |
5869 |
|
|
5870 |
|
Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, |
5871 |
< |
A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH |
5871 |
> |
A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH, |
5872 |
> |
CASE When A.SALARY > 10000 then 'higher paid' else 'lower paid' End |
5873 |
|
From EMPLOYEE A |
5874 |
|
JOIN Depts D On D.DEPT_NO = A.DEPT_NO |
5875 |
|
; |
5877 |
|
/* View: PHONE_LIST, Owner: SYSDBA */ |
5878 |
|
|
5879 |
|
CREATE VIEW PHONE_LIST ( |
5880 |
< |
EMP_NO, |
5881 |
< |
FIRST_NAME, |
5882 |
< |
LAST_NAME, |
5883 |
< |
PHONE_EXT, |
5884 |
< |
LOCATION, |
5880 |
> |
EMP_NO, |
5881 |
> |
FIRST_NAME, |
5882 |
> |
LAST_NAME, |
5883 |
> |
PHONE_EXT, |
5884 |
> |
LOCATION, |
5885 |
|
PHONE_NO |
5886 |
|
) AS |
5887 |
|
SELECT |
5983 |
|
CREATE EXCEPTION UNKNOWN_EMP_ID 'Invalid employee number or project id.'; |
5984 |
|
COMMIT WORK; |
5985 |
|
SET AUTODDL OFF; |
5986 |
< |
SET TERM ^ ; |
5986 |
> |
SET TERM ^; |
5987 |
|
|
5988 |
|
/* Package Definitions */ |
5989 |
|
|
5990 |
< |
CREATE PACKAGE FB$OUT |
5990 |
> |
CREATE PACKAGE FB$OUT |
5991 |
|
AS |
5933 |
– |
|
5992 |
|
begin |
5993 |
|
procedure enable; |
5994 |
|
procedure disable; |
5998 |
|
|
5999 |
|
procedure get_lines returns (lines fb$out_type); |
6000 |
|
end |
6001 |
< |
^ |
6001 |
> |
^ |
6002 |
|
|
6003 |
< |
CREATE PACKAGE SELECT$TEST |
6003 |
> |
CREATE PACKAGE SELECT$TEST |
6004 |
|
AS |
5947 |
– |
|
6005 |
|
Begin |
6006 |
|
Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer); |
6007 |
|
End |
6008 |
< |
^ |
6008 |
> |
^ |
6009 |
|
|
6010 |
< |
SET TERM ; ^ |
6010 |
> |
SET TERM ;^ |
6011 |
|
COMMIT WORK; |
6012 |
|
SET AUTODDL ON; |
6013 |
|
COMMIT WORK; |
6014 |
|
SET AUTODDL OFF; |
6015 |
< |
SET TERM ^ ; |
6015 |
> |
SET TERM ^; |
6016 |
|
|
6017 |
|
/* Stored procedures Definitions*/ |
6018 |
|
|
6019 |
< |
CREATE PROCEDURE SHOW_LANGS |
6019 |
> |
CREATE PROCEDURE SHOW_LANGS |
6020 |
|
( |
6021 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
6022 |
|
GRADE SMALLINT, |
6028 |
|
) |
6029 |
|
AS |
6030 |
|
BEGIN SUSPEND; EXIT; END |
5974 |
– |
|
6031 |
|
^ |
6032 |
|
|
6033 |
< |
CREATE PROCEDURE ADD_EMP_PROJ |
6033 |
> |
CREATE PROCEDURE ADD_EMP_PROJ |
6034 |
|
( |
6035 |
|
EMP_NO SMALLINT, |
6036 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
6037 |
|
) |
6038 |
|
AS |
6039 |
|
BEGIN EXIT; END |
5984 |
– |
|
6040 |
|
^ |
6041 |
|
|
6042 |
< |
CREATE PROCEDURE ALL_LANGS |
6042 |
> |
CREATE PROCEDURE ALL_LANGS |
6043 |
|
RETURNS |
6044 |
|
( |
6045 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
6049 |
|
) |
6050 |
|
AS |
6051 |
|
BEGIN SUSPEND; EXIT; END |
5997 |
– |
|
6052 |
|
^ |
6053 |
|
|
6054 |
< |
CREATE PROCEDURE DELETE_EMPLOYEE |
6054 |
> |
CREATE PROCEDURE DELETE_EMPLOYEE |
6055 |
|
( |
6056 |
|
EMP_NUM INTEGER |
6057 |
|
) |
6058 |
|
AS |
6059 |
|
BEGIN EXIT; END |
6006 |
– |
|
6060 |
|
^ |
6061 |
|
|
6062 |
< |
CREATE PROCEDURE DEPT_BUDGET |
6062 |
> |
CREATE PROCEDURE DEPT_BUDGET |
6063 |
|
( |
6064 |
|
DNO CHAR(3) CHARACTER SET NONE |
6065 |
|
) |
6066 |
|
RETURNS |
6067 |
|
( |
6068 |
< |
TOT DECIMAL(12, 2) |
6068 |
> |
TOT DECIMAL(12,2) |
6069 |
|
) |
6070 |
|
AS |
6071 |
|
BEGIN SUSPEND; EXIT; END |
6072 |
+ |
^ |
6073 |
|
|
6074 |
+ |
CREATE PROCEDURE EMPLOYEE_PAY_STATUS |
6075 |
+ |
( |
6076 |
+ |
EMP_NUM SMALLINT |
6077 |
+ |
) |
6078 |
+ |
RETURNS |
6079 |
+ |
( |
6080 |
+ |
PAY_STATUS VARCHAR(6) CHARACTER SET NONE, |
6081 |
+ |
SALARY NUMERIC(10,2) |
6082 |
+ |
) |
6083 |
+ |
AS |
6084 |
+ |
BEGIN EXIT; END |
6085 |
|
^ |
6086 |
|
|
6087 |
< |
CREATE PROCEDURE GET_EMP_PROJ |
6087 |
> |
CREATE PROCEDURE GET_EMP_PROJ |
6088 |
|
( |
6089 |
|
EMP_NO SMALLINT |
6090 |
|
) |
6094 |
|
) |
6095 |
|
AS |
6096 |
|
BEGIN SUSPEND; EXIT; END |
6032 |
– |
|
6097 |
|
^ |
6098 |
|
|
6099 |
< |
CREATE PROCEDURE "Has Space" |
6099 |
> |
CREATE PROCEDURE "Has Space" |
6100 |
|
( |
6101 |
|
ARG1 INTEGER |
6102 |
|
) |
6103 |
|
AS |
6104 |
|
BEGIN EXIT; END |
6041 |
– |
|
6105 |
|
^ |
6106 |
|
|
6107 |
< |
CREATE PROCEDURE MAIL_LABEL |
6107 |
> |
CREATE PROCEDURE MAIL_LABEL |
6108 |
|
( |
6109 |
|
CUST_NO INTEGER |
6110 |
|
) |
6119 |
|
) |
6120 |
|
AS |
6121 |
|
BEGIN SUSPEND; EXIT; END |
6059 |
– |
|
6122 |
|
^ |
6123 |
|
|
6124 |
< |
CREATE PROCEDURE ORG_CHART |
6124 |
> |
CREATE PROCEDURE ORG_CHART |
6125 |
|
RETURNS |
6126 |
|
( |
6127 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
6132 |
|
) |
6133 |
|
AS |
6134 |
|
BEGIN SUSPEND; EXIT; END |
6073 |
– |
|
6135 |
|
^ |
6136 |
|
|
6137 |
< |
CREATE PROCEDURE SHIP_ORDER |
6137 |
> |
CREATE PROCEDURE SHIP_ORDER |
6138 |
|
( |
6139 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
6140 |
|
) |
6141 |
|
AS |
6142 |
|
BEGIN EXIT; END |
6082 |
– |
|
6143 |
|
^ |
6144 |
|
|
6145 |
< |
CREATE PROCEDURE SUB_TOT_BUDGET |
6145 |
> |
CREATE PROCEDURE SUB_TOT_BUDGET |
6146 |
|
( |
6147 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
6148 |
|
) |
6149 |
|
RETURNS |
6150 |
|
( |
6151 |
< |
TOT_BUDGET DECIMAL(12, 2), |
6152 |
< |
AVG_BUDGET DECIMAL(12, 2), |
6153 |
< |
MIN_BUDGET DECIMAL(12, 2), |
6154 |
< |
MAX_BUDGET DECIMAL(12, 2) |
6151 |
> |
TOT_BUDGET DECIMAL(12,2), |
6152 |
> |
AVG_BUDGET DECIMAL(12,2), |
6153 |
> |
MIN_BUDGET DECIMAL(12,2), |
6154 |
> |
MAX_BUDGET DECIMAL(12,2) |
6155 |
|
) |
6156 |
|
AS |
6157 |
|
BEGIN SUSPEND; EXIT; END |
6098 |
– |
|
6158 |
|
^ |
6159 |
|
|
6160 |
< |
CREATE PROCEDURE "UC SPACE" |
6160 |
> |
CREATE PROCEDURE "UC SPACE" |
6161 |
|
( |
6162 |
|
ARG1 INTEGER |
6163 |
|
) |
6164 |
|
AS |
6165 |
|
BEGIN EXIT; END |
6107 |
– |
|
6166 |
|
^ |
6167 |
|
|
6168 |
< |
CREATE PROCEDURE "iCASE" |
6168 |
> |
CREATE PROCEDURE "iCASE" |
6169 |
|
AS |
6170 |
|
BEGIN EXIT; END |
6113 |
– |
|
6171 |
|
^ |
6172 |
|
|
6173 |
< |
SET TERM ; ^ |
6173 |
> |
SET TERM ;^ |
6174 |
|
COMMIT WORK; |
6175 |
|
SET AUTODDL ON; |
6176 |
|
COMMIT WORK; |
6177 |
|
SET AUTODDL OFF; |
6178 |
< |
SET TERM ^ ; |
6178 |
> |
SET TERM ^; |
6179 |
|
|
6180 |
|
/* Stored Function declarations */ |
6181 |
|
|
6182 |
|
CREATE FUNCTION F (X INTEGER) |
6183 |
|
RETURNS INTEGER |
6184 |
|
AS BEGIN END |
6128 |
– |
|
6185 |
|
^ |
6186 |
|
|
6187 |
< |
|
6132 |
< |
SET TERM ; ^ |
6187 |
> |
SET TERM ;^ |
6188 |
|
COMMIT WORK; |
6189 |
|
SET AUTODDL ON; |
6190 |
< |
SET TERM ^ ; |
6190 |
> |
SET TERM ^; |
6191 |
|
|
6192 |
|
|
6193 |
|
/* Triggers only will work for SQL triggers */ |
6197 |
|
as |
6198 |
|
begin |
6199 |
|
End |
6200 |
< |
^ |
6200 |
> |
^ |
6201 |
> |
|
6202 |
|
CREATE TRIGGER "BEFORE CREATE TABLE" |
6203 |
|
ACTIVE BEFORE CREATE TABLE POSITION 0 |
6204 |
|
AS BEGIN END |
6205 |
< |
^ |
6205 |
> |
^ |
6206 |
> |
|
6207 |
|
CREATE TRIGGER "AFTER CREATE TABLE" |
6208 |
|
ACTIVE AFTER CREATE TABLE POSITION 0 |
6209 |
|
AS BEGIN END |
6210 |
< |
^ |
6210 |
> |
^ |
6211 |
> |
|
6212 |
|
CREATE TRIGGER "BEFORE ALTER TABLE" |
6213 |
|
ACTIVE BEFORE ALTER TABLE POSITION 0 |
6214 |
|
AS BEGIN END |
6215 |
< |
^ |
6215 |
> |
^ |
6216 |
> |
|
6217 |
|
CREATE TRIGGER "AFTER ALTER TABLE" |
6218 |
|
ACTIVE AFTER ALTER TABLE POSITION 0 |
6219 |
|
AS BEGIN END |
6220 |
< |
^ |
6220 |
> |
^ |
6221 |
> |
|
6222 |
|
CREATE TRIGGER "AFTER CREATE/Alter TABLE" |
6223 |
|
ACTIVE AFTER CREATE TABLE OR ALTER TABLE POSITION 0 |
6224 |
|
AS BEGIN END |
6225 |
< |
^ |
6225 |
> |
^ |
6226 |
> |
|
6227 |
|
CREATE TRIGGER "BEFORE DROP TABLE" |
6228 |
|
ACTIVE BEFORE Drop TABLE POSITION 0 |
6229 |
|
AS BEGIN END |
6230 |
< |
^ |
6230 |
> |
^ |
6231 |
> |
|
6232 |
|
CREATE TRIGGER "AFTER DROP TABLE" |
6233 |
|
ACTIVE AFTER Drop TABLE POSITION 0 |
6234 |
|
AS BEGIN END |
6235 |
< |
^ |
6235 |
> |
^ |
6236 |
> |
|
6237 |
|
CREATE TRIGGER "BEFORE CREATE PROCEDURE" |
6238 |
|
ACTIVE BEFORE CREATE PROCEDURE POSITION 0 |
6239 |
|
AS BEGIN END |
6240 |
< |
^ |
6240 |
> |
^ |
6241 |
> |
|
6242 |
|
CREATE TRIGGER "AFTER CREATE PROCEDURE" |
6243 |
|
ACTIVE AFTER CREATE PROCEDURE POSITION 0 |
6244 |
|
AS BEGIN END |
6245 |
< |
^ |
6245 |
> |
^ |
6246 |
> |
|
6247 |
|
CREATE TRIGGER "BEFORE ALTER PROCEDURE" |
6248 |
|
ACTIVE BEFORE ALTER PROCEDURE POSITION 0 |
6249 |
|
AS BEGIN END |
6250 |
< |
^ |
6250 |
> |
^ |
6251 |
> |
|
6252 |
|
CREATE TRIGGER "AFTER ALTER PROCEDURE" |
6253 |
|
ACTIVE AFTER ALTER PROCEDURE POSITION 0 |
6254 |
|
AS BEGIN END |
6255 |
< |
^ |
6255 |
> |
^ |
6256 |
> |
|
6257 |
|
CREATE TRIGGER "BEFORE DROP PROCEDURE" |
6258 |
|
ACTIVE BEFORE Drop PROCEDURE POSITION 0 |
6259 |
|
AS BEGIN END |
6260 |
< |
^ |
6260 |
> |
^ |
6261 |
> |
|
6262 |
|
CREATE TRIGGER "AFTER DROP PROCEDURE" |
6263 |
|
ACTIVE AFTER Drop PROCEDURE POSITION 0 |
6264 |
|
AS BEGIN END |
6265 |
< |
^ |
6265 |
> |
^ |
6266 |
> |
|
6267 |
|
CREATE TRIGGER "BEFORE CREATE FUNCTION" |
6268 |
|
ACTIVE BEFORE CREATE FUNCTION POSITION 0 |
6269 |
|
AS BEGIN END |
6270 |
< |
^ |
6270 |
> |
^ |
6271 |
> |
|
6272 |
|
CREATE TRIGGER "AFTER CREATE FUNCTION" |
6273 |
|
ACTIVE AFTER CREATE FUNCTION POSITION 0 |
6274 |
|
AS BEGIN END |
6275 |
< |
^ |
6275 |
> |
^ |
6276 |
> |
|
6277 |
|
CREATE TRIGGER "BEFORE ALTER FUNCTION" |
6278 |
|
ACTIVE BEFORE ALTER FUNCTION POSITION 0 |
6279 |
|
AS BEGIN END |
6280 |
< |
^ |
6280 |
> |
^ |
6281 |
> |
|
6282 |
|
CREATE TRIGGER "AFTER ALTER FUNCTION" |
6283 |
|
ACTIVE AFTER ALTER FUNCTION POSITION 0 |
6284 |
|
AS BEGIN END |
6285 |
< |
^ |
6285 |
> |
^ |
6286 |
> |
|
6287 |
|
CREATE TRIGGER "BEFORE DROP FUNCTION" |
6288 |
|
ACTIVE BEFORE Drop FUNCTION POSITION 0 |
6289 |
|
AS BEGIN END |
6290 |
< |
^ |
6290 |
> |
^ |
6291 |
> |
|
6292 |
|
CREATE TRIGGER "AFTER DROP FUNCTION" |
6293 |
|
ACTIVE AFTER Drop FUNCTION POSITION 0 |
6294 |
|
AS BEGIN END |
6295 |
< |
^ |
6295 |
> |
^ |
6296 |
> |
|
6297 |
|
CREATE TRIGGER "BEFORE CREATE TRIGGER" |
6298 |
|
ACTIVE BEFORE CREATE TRIGGER POSITION 0 |
6299 |
|
AS BEGIN END |
6300 |
< |
^ |
6300 |
> |
^ |
6301 |
> |
|
6302 |
|
CREATE TRIGGER "AFTER CREATE TRIGGER" |
6303 |
|
ACTIVE AFTER CREATE TRIGGER POSITION 0 |
6304 |
|
AS BEGIN END |
6305 |
< |
^ |
6305 |
> |
^ |
6306 |
> |
|
6307 |
|
CREATE TRIGGER "BEFORE ALTER TRIGGER" |
6308 |
|
ACTIVE BEFORE ALTER TRIGGER POSITION 0 |
6309 |
|
AS BEGIN END |
6310 |
< |
^ |
6310 |
> |
^ |
6311 |
> |
|
6312 |
|
CREATE TRIGGER "AFTER ALTER TRIGGER" |
6313 |
|
ACTIVE AFTER ALTER TRIGGER POSITION 0 |
6314 |
|
AS BEGIN END |
6315 |
< |
^ |
6315 |
> |
^ |
6316 |
> |
|
6317 |
|
CREATE TRIGGER "BEFORE DROP TRIGGER" |
6318 |
|
ACTIVE BEFORE Drop TRIGGER POSITION 0 |
6319 |
|
AS BEGIN END |
6320 |
< |
^ |
6320 |
> |
^ |
6321 |
> |
|
6322 |
|
CREATE TRIGGER "AFTER DROP TRIGGER" |
6323 |
|
ACTIVE AFTER Drop TRIGGER POSITION 0 |
6324 |
|
AS BEGIN END |
6325 |
< |
^ |
6325 |
> |
^ |
6326 |
> |
|
6327 |
|
CREATE TRIGGER "BEFORE CREATE EXCEPTION" |
6328 |
|
ACTIVE BEFORE CREATE EXCEPTION POSITION 0 |
6329 |
|
AS BEGIN END |
6330 |
< |
^ |
6330 |
> |
^ |
6331 |
> |
|
6332 |
|
CREATE TRIGGER "AFTER CREATE EXCEPTION" |
6333 |
|
ACTIVE AFTER CREATE EXCEPTION POSITION 0 |
6334 |
|
AS BEGIN END |
6335 |
< |
^ |
6335 |
> |
^ |
6336 |
> |
|
6337 |
|
CREATE TRIGGER "BEFORE ALTER EXCEPTION" |
6338 |
|
ACTIVE BEFORE ALTER EXCEPTION POSITION 0 |
6339 |
|
AS BEGIN END |
6340 |
< |
^ |
6340 |
> |
^ |
6341 |
> |
|
6342 |
|
CREATE TRIGGER "AFTER ALTER EXCEPTION" |
6343 |
|
ACTIVE AFTER ALTER EXCEPTION POSITION 0 |
6344 |
|
AS BEGIN END |
6345 |
< |
^ |
6345 |
> |
^ |
6346 |
> |
|
6347 |
|
CREATE TRIGGER "BEFORE DROP EXCEPTION" |
6348 |
|
ACTIVE BEFORE Drop EXCEPTION POSITION 0 |
6349 |
|
AS BEGIN END |
6350 |
< |
^ |
6350 |
> |
^ |
6351 |
> |
|
6352 |
|
CREATE TRIGGER "AFTER DROP EXCEPTION" |
6353 |
|
ACTIVE AFTER Drop EXCEPTION POSITION 0 |
6354 |
|
AS BEGIN END |
6355 |
< |
^ |
6355 |
> |
^ |
6356 |
> |
|
6357 |
|
CREATE TRIGGER "BEFORE CREATE VIEW" |
6358 |
|
ACTIVE BEFORE CREATE VIEW POSITION 0 |
6359 |
|
AS BEGIN END |
6360 |
< |
^ |
6360 |
> |
^ |
6361 |
> |
|
6362 |
|
CREATE TRIGGER "AFTER CREATE VIEW" |
6363 |
|
ACTIVE AFTER CREATE VIEW POSITION 0 |
6364 |
|
AS BEGIN END |
6365 |
< |
^ |
6365 |
> |
^ |
6366 |
> |
|
6367 |
|
CREATE TRIGGER "BEFORE ALTER VIEW" |
6368 |
|
ACTIVE BEFORE ALTER VIEW POSITION 0 |
6369 |
|
AS BEGIN END |
6370 |
< |
^ |
6370 |
> |
^ |
6371 |
> |
|
6372 |
|
CREATE TRIGGER "AFTER ALTER VIEW" |
6373 |
|
ACTIVE AFTER ALTER VIEW POSITION 0 |
6374 |
|
AS BEGIN END |
6375 |
< |
^ |
6375 |
> |
^ |
6376 |
> |
|
6377 |
|
CREATE TRIGGER "BEFORE DROP VIEW" |
6378 |
|
ACTIVE BEFORE Drop VIEW POSITION 0 |
6379 |
|
AS BEGIN END |
6380 |
< |
^ |
6380 |
> |
^ |
6381 |
> |
|
6382 |
|
CREATE TRIGGER "AFTER DROP VIEW" |
6383 |
|
ACTIVE AFTER Drop VIEW POSITION 0 |
6384 |
|
AS BEGIN END |
6385 |
< |
^ |
6385 |
> |
^ |
6386 |
> |
|
6387 |
|
CREATE TRIGGER "BEFORE CREATE DOMAIN" |
6388 |
|
ACTIVE BEFORE CREATE DOMAIN POSITION 0 |
6389 |
|
AS BEGIN END |
6390 |
< |
^ |
6390 |
> |
^ |
6391 |
> |
|
6392 |
|
CREATE TRIGGER "AFTER CREATE DOMAIN" |
6393 |
|
ACTIVE AFTER CREATE DOMAIN POSITION 0 |
6394 |
|
AS BEGIN END |
6395 |
< |
^ |
6395 |
> |
^ |
6396 |
> |
|
6397 |
|
CREATE TRIGGER "BEFORE ALTER DOMAIN" |
6398 |
|
ACTIVE BEFORE ALTER DOMAIN POSITION 0 |
6399 |
|
AS BEGIN END |
6400 |
< |
^ |
6400 |
> |
^ |
6401 |
> |
|
6402 |
|
CREATE TRIGGER "AFTER ALTER DOMAIN" |
6403 |
|
ACTIVE AFTER ALTER DOMAIN POSITION 0 |
6404 |
|
AS BEGIN END |
6405 |
< |
^ |
6405 |
> |
^ |
6406 |
> |
|
6407 |
|
CREATE TRIGGER "BEFORE DROP DOMAIN" |
6408 |
|
ACTIVE BEFORE Drop DOMAIN POSITION 0 |
6409 |
|
AS BEGIN END |
6410 |
< |
^ |
6410 |
> |
^ |
6411 |
> |
|
6412 |
|
CREATE TRIGGER "AFTER DROP DOMAIN" |
6413 |
|
ACTIVE AFTER Drop DOMAIN POSITION 0 |
6414 |
|
AS BEGIN END |
6415 |
< |
^ |
6415 |
> |
^ |
6416 |
> |
|
6417 |
|
CREATE TRIGGER "BEFORE CREATE ROLE" |
6418 |
|
ACTIVE BEFORE CREATE ROLE POSITION 0 |
6419 |
|
AS BEGIN END |
6420 |
< |
^ |
6420 |
> |
^ |
6421 |
> |
|
6422 |
|
CREATE TRIGGER "AFTER CREATE ROLE" |
6423 |
|
ACTIVE AFTER CREATE ROLE POSITION 0 |
6424 |
|
AS BEGIN END |
6425 |
< |
^ |
6425 |
> |
^ |
6426 |
> |
|
6427 |
|
CREATE TRIGGER "BEFORE ALTER ROLE" |
6428 |
|
ACTIVE BEFORE ALTER ROLE POSITION 0 |
6429 |
|
AS BEGIN END |
6430 |
< |
^ |
6430 |
> |
^ |
6431 |
> |
|
6432 |
|
CREATE TRIGGER "AFTER ALTER ROLE" |
6433 |
|
ACTIVE AFTER ALTER ROLE POSITION 0 |
6434 |
|
AS BEGIN END |
6435 |
< |
^ |
6435 |
> |
^ |
6436 |
> |
|
6437 |
|
CREATE TRIGGER "BEFORE DROP ROLE" |
6438 |
|
ACTIVE BEFORE Drop ROLE POSITION 0 |
6439 |
|
AS BEGIN END |
6440 |
< |
^ |
6440 |
> |
^ |
6441 |
> |
|
6442 |
|
CREATE TRIGGER "AFTER DROP ROLE" |
6443 |
|
ACTIVE AFTER Drop ROLE POSITION 0 |
6444 |
|
AS BEGIN END |
6445 |
< |
^ |
6445 |
> |
^ |
6446 |
> |
|
6447 |
|
CREATE TRIGGER "BEFORE CREATE INDEX" |
6448 |
|
ACTIVE BEFORE CREATE INDEX POSITION 0 |
6449 |
|
AS BEGIN END |
6450 |
< |
^ |
6450 |
> |
^ |
6451 |
> |
|
6452 |
|
CREATE TRIGGER "AFTER CREATE INDEX" |
6453 |
|
ACTIVE AFTER CREATE INDEX POSITION 0 |
6454 |
|
AS BEGIN END |
6455 |
< |
^ |
6455 |
> |
^ |
6456 |
> |
|
6457 |
|
CREATE TRIGGER "BEFORE ALTER INDEX" |
6458 |
|
ACTIVE BEFORE ALTER INDEX POSITION 0 |
6459 |
|
AS BEGIN END |
6460 |
< |
^ |
6460 |
> |
^ |
6461 |
> |
|
6462 |
|
CREATE TRIGGER "AFTER ALTER INDEX" |
6463 |
|
ACTIVE AFTER ALTER INDEX POSITION 0 |
6464 |
|
AS BEGIN END |
6465 |
< |
^ |
6465 |
> |
^ |
6466 |
> |
|
6467 |
|
CREATE TRIGGER "BEFORE DROP INDEX" |
6468 |
|
ACTIVE BEFORE Drop INDEX POSITION 0 |
6469 |
|
AS BEGIN END |
6470 |
< |
^ |
6470 |
> |
^ |
6471 |
> |
|
6472 |
|
CREATE TRIGGER "AFTER DROP INDEX" |
6473 |
|
ACTIVE AFTER Drop INDEX POSITION 0 |
6474 |
|
AS BEGIN END |
6475 |
< |
^ |
6475 |
> |
^ |
6476 |
> |
|
6477 |
|
CREATE TRIGGER "BEFORE CREATE SEQUENCE" |
6478 |
|
ACTIVE BEFORE CREATE SEQUENCE POSITION 0 |
6479 |
|
AS BEGIN END |
6480 |
< |
^ |
6480 |
> |
^ |
6481 |
> |
|
6482 |
|
CREATE TRIGGER "AFTER CREATE SEQUENCE" |
6483 |
|
ACTIVE AFTER CREATE SEQUENCE POSITION 0 |
6484 |
|
AS BEGIN END |
6485 |
< |
^ |
6485 |
> |
^ |
6486 |
> |
|
6487 |
|
CREATE TRIGGER "BEFORE ALTER SEQUENCE" |
6488 |
|
ACTIVE BEFORE ALTER SEQUENCE POSITION 0 |
6489 |
|
AS BEGIN END |
6490 |
< |
^ |
6490 |
> |
^ |
6491 |
> |
|
6492 |
|
CREATE TRIGGER "AFTER ALTER SEQUENCE" |
6493 |
|
ACTIVE AFTER ALTER SEQUENCE POSITION 0 |
6494 |
|
AS BEGIN END |
6495 |
< |
^ |
6495 |
> |
^ |
6496 |
> |
|
6497 |
|
CREATE TRIGGER "BEFORE DROP SEQUENCE" |
6498 |
|
ACTIVE BEFORE Drop SEQUENCE POSITION 0 |
6499 |
|
AS BEGIN END |
6500 |
< |
^ |
6500 |
> |
^ |
6501 |
> |
|
6502 |
|
CREATE TRIGGER "AFTER DROP SEQUENCE" |
6503 |
|
ACTIVE AFTER Drop SEQUENCE POSITION 0 |
6504 |
|
AS BEGIN END |
6505 |
< |
^ |
6505 |
> |
^ |
6506 |
> |
|
6507 |
|
CREATE TRIGGER "BEFORE CREATE USER" |
6508 |
|
ACTIVE BEFORE CREATE USER POSITION 0 |
6509 |
|
AS BEGIN END |
6510 |
< |
^ |
6510 |
> |
^ |
6511 |
> |
|
6512 |
|
CREATE TRIGGER "AFTER CREATE USER" |
6513 |
|
ACTIVE AFTER CREATE USER POSITION 0 |
6514 |
|
AS BEGIN END |
6515 |
< |
^ |
6515 |
> |
^ |
6516 |
> |
|
6517 |
|
CREATE TRIGGER "BEFORE ALTER USER" |
6518 |
|
ACTIVE BEFORE ALTER USER POSITION 0 |
6519 |
|
AS BEGIN END |
6520 |
< |
^ |
6520 |
> |
^ |
6521 |
> |
|
6522 |
|
CREATE TRIGGER "AFTER ALTER USER" |
6523 |
|
ACTIVE AFTER ALTER USER POSITION 0 |
6524 |
|
AS BEGIN END |
6525 |
< |
^ |
6525 |
> |
^ |
6526 |
> |
|
6527 |
|
CREATE TRIGGER "BEFORE DROP USER" |
6528 |
|
ACTIVE BEFORE Drop USER POSITION 0 |
6529 |
|
AS BEGIN END |
6530 |
< |
^ |
6530 |
> |
^ |
6531 |
> |
|
6532 |
|
CREATE TRIGGER "AFTER DROP USER" |
6533 |
|
ACTIVE AFTER Drop USER POSITION 0 |
6534 |
|
AS BEGIN END |
6535 |
< |
^ |
6535 |
> |
^ |
6536 |
> |
|
6537 |
|
CREATE TRIGGER "BEFORE CREATE COLLATION" |
6538 |
|
ACTIVE BEFORE CREATE COLLATION POSITION 0 |
6539 |
|
AS BEGIN END |
6540 |
< |
^ |
6540 |
> |
^ |
6541 |
> |
|
6542 |
|
CREATE TRIGGER "AFTER CREATE COLLATION" |
6543 |
|
ACTIVE AFTER CREATE COLLATION POSITION 0 |
6544 |
|
AS BEGIN END |
6545 |
< |
^ |
6545 |
> |
^ |
6546 |
> |
|
6547 |
|
CREATE TRIGGER "BEFORE DROP COLLATION" |
6548 |
|
ACTIVE BEFORE Drop COLLATION POSITION 0 |
6549 |
|
AS BEGIN END |
6550 |
< |
^ |
6550 |
> |
^ |
6551 |
> |
|
6552 |
|
CREATE TRIGGER "AFTER DROP COLLATION" |
6553 |
|
ACTIVE AFTER Drop COLLATION POSITION 0 |
6554 |
|
AS BEGIN END |
6555 |
< |
^ |
6555 |
> |
^ |
6556 |
> |
|
6557 |
|
CREATE TRIGGER "BEFORE ALTER CHARACTER SET" |
6558 |
|
ACTIVE BEFORE ALTER CHARACTER SET POSITION 0 |
6559 |
|
AS BEGIN END |
6560 |
< |
^ |
6560 |
> |
^ |
6561 |
> |
|
6562 |
|
CREATE TRIGGER "AFTER ALTER CHARACTER SET" |
6563 |
|
ACTIVE AFTER ALTER CHARACTER SET POSITION 0 |
6564 |
|
AS BEGIN END |
6565 |
< |
^ |
6565 |
> |
^ |
6566 |
> |
|
6567 |
|
CREATE TRIGGER "BEFORE CREATE PACKAGE" |
6568 |
|
ACTIVE BEFORE CREATE PACKAGE POSITION 0 |
6569 |
|
AS BEGIN END |
6570 |
< |
^ |
6570 |
> |
^ |
6571 |
> |
|
6572 |
|
CREATE TRIGGER "AFTER CREATE PACKAGE" |
6573 |
|
ACTIVE AFTER CREATE PACKAGE POSITION 0 |
6574 |
|
AS BEGIN END |
6575 |
< |
^ |
6575 |
> |
^ |
6576 |
> |
|
6577 |
|
CREATE TRIGGER "BEFORE ALTER PACKAGE" |
6578 |
|
ACTIVE BEFORE ALTER PACKAGE POSITION 0 |
6579 |
|
AS BEGIN END |
6580 |
< |
^ |
6580 |
> |
^ |
6581 |
> |
|
6582 |
|
CREATE TRIGGER "AFTER ALTER PACKAGE" |
6583 |
|
ACTIVE AFTER ALTER PACKAGE POSITION 0 |
6584 |
|
AS BEGIN END |
6585 |
< |
^ |
6585 |
> |
^ |
6586 |
> |
|
6587 |
|
CREATE TRIGGER "BEFORE DROP PACKAGE" |
6588 |
|
ACTIVE BEFORE Drop PACKAGE POSITION 0 |
6589 |
|
AS BEGIN END |
6590 |
< |
^ |
6590 |
> |
^ |
6591 |
> |
|
6592 |
|
CREATE TRIGGER "AFTER DROP PACKAGE" |
6593 |
|
ACTIVE AFTER Drop PACKAGE POSITION 0 |
6594 |
|
AS BEGIN END |
6595 |
< |
^ |
6595 |
> |
^ |
6596 |
> |
|
6597 |
|
CREATE TRIGGER "BEFORE CREATE PACKAGE BODY" |
6598 |
|
ACTIVE BEFORE CREATE PACKAGE BODY POSITION 0 |
6599 |
|
AS BEGIN END |
6600 |
< |
^ |
6600 |
> |
^ |
6601 |
> |
|
6602 |
|
CREATE TRIGGER "AFTER CREATE PACKAGE BODY" |
6603 |
|
ACTIVE AFTER CREATE PACKAGE BODY POSITION 0 |
6604 |
|
AS BEGIN END |
6605 |
< |
^ |
6605 |
> |
^ |
6606 |
> |
|
6607 |
|
CREATE TRIGGER "BEFORE DROP PACKAGE BODY" |
6608 |
|
ACTIVE BEFORE Drop PACKAGE BODY POSITION 0 |
6609 |
|
AS BEGIN END |
6610 |
< |
^ |
6610 |
> |
^ |
6611 |
> |
|
6612 |
|
CREATE TRIGGER "AFTER DROP PACKAGE BODY" |
6613 |
|
ACTIVE AFTER Drop PACKAGE BODY POSITION 0 |
6614 |
|
AS BEGIN END |
6615 |
< |
^ |
6615 |
> |
^ |
6616 |
> |
|
6617 |
|
CREATE TRIGGER "BEFORE ANY DDL STATEMENT" |
6618 |
|
ACTIVE BEFORE ANY DDL STATEMENT POSITION 0 |
6619 |
|
AS BEGIN END |
6620 |
< |
^ |
6620 |
> |
^ |
6621 |
> |
|
6622 |
|
CREATE TRIGGER "AFTER ANY DDL STATEMENT" |
6623 |
|
ACTIVE AFTER ANY DDL STATEMENT POSITION 0 |
6624 |
|
AS BEGIN END |
6625 |
< |
^ |
6625 |
> |
^ |
6626 |
> |
|
6627 |
|
CREATE TRIGGER SET_CUST_NO FOR CUSTOMER |
6628 |
|
ACTIVE BEFORE INSERT POSITION 0 |
6629 |
|
AS |
6631 |
|
if (new.cust_no is null) then |
6632 |
|
new.cust_no = gen_id(cust_no_gen, 1); |
6633 |
|
END |
6634 |
< |
^ |
6634 |
> |
^ |
6635 |
> |
|
6636 |
|
CREATE TRIGGER SET_EMP_NO FOR EMPLOYEE |
6637 |
|
ACTIVE BEFORE INSERT POSITION 0 |
6638 |
|
AS |
6640 |
|
if (new.emp_no is null) then |
6641 |
|
new.emp_no = gen_id(emp_no_gen, 1); |
6642 |
|
END |
6643 |
< |
^ |
6643 |
> |
^ |
6644 |
> |
|
6645 |
|
CREATE TRIGGER SAVE_SALARY_CHANGE FOR EMPLOYEE |
6646 |
|
ACTIVE AFTER UPDATE POSITION 0 |
6647 |
|
AS |
6656 |
|
old.salary, |
6657 |
|
(new.salary - old.salary) * 100 / old.salary); |
6658 |
|
END |
6659 |
< |
^ |
6659 |
> |
^ |
6660 |
> |
|
6661 |
|
CREATE TRIGGER POST_NEW_ORDER FOR SALES |
6662 |
|
ACTIVE AFTER INSERT POSITION 0 |
6663 |
|
AS |
6664 |
|
BEGIN |
6665 |
|
POST_EVENT 'new_order'; |
6666 |
|
END |
6667 |
< |
^ |
6668 |
< |
COMMIT WORK ^ |
6667 |
> |
^ |
6668 |
> |
|
6669 |
> |
COMMIT WORK^ |
6670 |
|
SET TERM ;^ |
6671 |
|
COMMIT WORK; |
6672 |
|
SET AUTODDL OFF; |
6673 |
< |
SET TERM ^ ; |
6673 |
> |
SET TERM ^; |
6674 |
|
|
6675 |
|
/* Package Definitions */ |
6676 |
|
|
6677 |
< |
CREATE PACKAGE BODY FB$OUT |
6677 |
> |
CREATE PACKAGE BODY FB$OUT |
6678 |
|
AS |
6534 |
– |
|
6679 |
|
begin |
6680 |
|
procedure enable |
6681 |
|
as |
6730 |
|
execute procedure clear; |
6731 |
|
end |
6732 |
|
end |
6733 |
< |
^ |
6733 |
> |
^ |
6734 |
|
|
6735 |
< |
CREATE PACKAGE BODY SELECT$TEST |
6735 |
> |
CREATE PACKAGE BODY SELECT$TEST |
6736 |
|
AS |
6593 |
– |
|
6737 |
|
Begin |
6738 |
|
Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer) |
6739 |
|
As |
6741 |
|
SUSPEND; |
6742 |
|
End |
6743 |
|
End |
6744 |
< |
^ |
6744 |
> |
^ |
6745 |
|
|
6746 |
< |
SET TERM ; ^ |
6746 |
> |
SET TERM ;^ |
6747 |
|
COMMIT WORK; |
6748 |
|
SET AUTODDL ON; |
6749 |
|
COMMIT WORK; |
6750 |
|
SET AUTODDL OFF; |
6751 |
< |
SET TERM ^ ; |
6751 |
> |
SET TERM ^; |
6752 |
|
|
6753 |
|
/* Stored procedure Bodies */ |
6754 |
|
|
6755 |
< |
|
6613 |
< |
ALTER PROCEDURE SHOW_LANGS |
6755 |
> |
ALTER PROCEDURE SHOW_LANGS |
6756 |
|
( |
6757 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
6758 |
|
GRADE SMALLINT, |
6773 |
|
AND (language_req IS NOT NULL)) |
6774 |
|
INTO :languages; |
6775 |
|
IF (languages = ' ') THEN /* Prints 'NULL' instead of blanks */ |
6776 |
< |
languages = 'NULL'; |
6776 |
> |
languages = 'NULL'; |
6777 |
|
i = i +1; |
6778 |
|
SUSPEND; |
6779 |
|
END |
6780 |
|
END |
6781 |
< |
^ |
6640 |
< |
|
6781 |
> |
^ |
6782 |
|
|
6783 |
< |
ALTER PROCEDURE ADD_EMP_PROJ |
6783 |
> |
ALTER PROCEDURE ADD_EMP_PROJ |
6784 |
|
( |
6785 |
|
EMP_NO SMALLINT, |
6786 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
6793 |
|
EXCEPTION unknown_emp_id; |
6794 |
|
END |
6795 |
|
END |
6796 |
< |
^ |
6656 |
< |
|
6796 |
> |
^ |
6797 |
|
|
6798 |
< |
ALTER PROCEDURE ALL_LANGS |
6798 |
> |
ALTER PROCEDURE ALL_LANGS |
6799 |
|
RETURNS |
6800 |
|
( |
6801 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
6805 |
|
) |
6806 |
|
AS |
6807 |
|
BEGIN |
6808 |
< |
FOR SELECT job_code, job_grade, job_country FROM job |
6808 |
> |
FOR SELECT job_code, job_grade, job_country FROM job |
6809 |
|
INTO :code, :grade, :country |
6810 |
|
|
6811 |
|
DO |
6812 |
|
BEGIN |
6813 |
< |
FOR SELECT languages FROM show_langs |
6813 |
> |
FOR SELECT languages FROM show_langs |
6814 |
|
(:code, :grade, :country) INTO :lang DO |
6815 |
|
SUSPEND; |
6816 |
|
/* Put nice separators between rows */ |
6821 |
|
SUSPEND; |
6822 |
|
END |
6823 |
|
END |
6824 |
< |
^ |
6685 |
< |
|
6824 |
> |
^ |
6825 |
|
|
6826 |
< |
ALTER PROCEDURE DELETE_EMPLOYEE |
6826 |
> |
ALTER PROCEDURE DELETE_EMPLOYEE |
6827 |
|
( |
6828 |
|
EMP_NUM INTEGER |
6829 |
|
) |
6834 |
|
|
6835 |
|
/* |
6836 |
|
* If there are any sales records referencing this employee, |
6837 |
< |
* can't delete the employee until the sales are re-assigned |
6837 |
> |
* cannot delete the employee until the sales are re-assigned |
6838 |
|
* to another employee or changed to NULL. |
6839 |
|
*/ |
6840 |
|
SELECT count(po_number) |
6880 |
|
WHERE emp_no = :emp_num; |
6881 |
|
|
6882 |
|
END |
6883 |
< |
^ |
6745 |
< |
|
6883 |
> |
^ |
6884 |
|
|
6885 |
< |
ALTER PROCEDURE DEPT_BUDGET |
6885 |
> |
ALTER PROCEDURE DEPT_BUDGET |
6886 |
|
( |
6887 |
|
DNO CHAR(3) CHARACTER SET NONE |
6888 |
|
) |
6889 |
|
RETURNS |
6890 |
|
( |
6891 |
< |
TOT DECIMAL(12, 2) |
6891 |
> |
TOT DECIMAL(12,2) |
6892 |
|
) |
6893 |
|
AS |
6894 |
< |
DECLARE VARIABLE sumb DECIMAL(12, 2); |
6894 |
> |
DECLARE VARIABLE sumb DECIMAL(12,2); |
6895 |
|
DECLARE VARIABLE rdno CHAR(3); |
6896 |
|
DECLARE VARIABLE cnt INTEGER; |
6897 |
|
BEGIN |
6916 |
|
|
6917 |
|
SUSPEND; |
6918 |
|
END |
6919 |
< |
^ |
6919 |
> |
^ |
6920 |
|
|
6921 |
+ |
ALTER PROCEDURE EMPLOYEE_PAY_STATUS |
6922 |
+ |
( |
6923 |
+ |
EMP_NUM SMALLINT |
6924 |
+ |
) |
6925 |
+ |
RETURNS |
6926 |
+ |
( |
6927 |
+ |
PAY_STATUS VARCHAR(6) CHARACTER SET NONE, |
6928 |
+ |
SALARY NUMERIC(10,2) |
6929 |
+ |
) |
6930 |
+ |
AS |
6931 |
+ |
Declare aCursor CURSOR FOR ( |
6932 |
+ |
Select EMP_NO,SALARY From EMPLOYEE WHERE LAST_NAME = 'unknown'); |
6933 |
+ |
BEGIN |
6934 |
+ |
Select SALARY, Case |
6935 |
+ |
When SALARY > 10000 and SALARY <= 100000 then 'higher' |
6936 |
+ |
When SALARY > 100000 then 'gross' |
6937 |
+ |
else 'lower' End |
6938 |
+ |
From employee |
6939 |
+ |
WHERE emp_no = :EMP_NUM |
6940 |
+ |
into :SALARY, :PAY_STATUS; |
6941 |
+ |
END |
6942 |
+ |
^ |
6943 |
|
|
6944 |
< |
ALTER PROCEDURE GET_EMP_PROJ |
6944 |
> |
ALTER PROCEDURE GET_EMP_PROJ |
6945 |
|
( |
6946 |
|
EMP_NO SMALLINT |
6947 |
|
) |
6958 |
|
DO |
6959 |
|
SUSPEND; |
6960 |
|
END |
6961 |
< |
^ |
6802 |
< |
|
6961 |
> |
^ |
6962 |
|
|
6963 |
< |
ALTER PROCEDURE "Has Space" |
6963 |
> |
ALTER PROCEDURE "Has Space" |
6964 |
|
( |
6965 |
|
ARG1 INTEGER |
6966 |
|
) |
6967 |
|
AS |
6968 |
|
Begin End |
6969 |
< |
^ |
6811 |
< |
|
6969 |
> |
^ |
6970 |
|
|
6971 |
< |
ALTER PROCEDURE MAIL_LABEL |
6971 |
> |
ALTER PROCEDURE MAIL_LABEL |
6972 |
|
( |
6973 |
|
CUST_NO INTEGER |
6974 |
|
) |
7036 |
|
|
7037 |
|
SUSPEND; |
7038 |
|
END |
7039 |
< |
^ |
6882 |
< |
|
7039 |
> |
^ |
7040 |
|
|
7041 |
< |
ALTER PROCEDURE ORG_CHART |
7041 |
> |
ALTER PROCEDURE ORG_CHART |
7042 |
|
RETURNS |
7043 |
|
( |
7044 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
7078 |
|
SUSPEND; |
7079 |
|
END |
7080 |
|
END |
7081 |
< |
^ |
6925 |
< |
|
7081 |
> |
^ |
7082 |
|
|
7083 |
< |
ALTER PROCEDURE SHIP_ORDER |
7083 |
> |
ALTER PROCEDURE SHIP_ORDER |
7084 |
|
( |
7085 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
7086 |
|
) |
7137 |
|
WHERE po_number = :po_num; |
7138 |
|
|
7139 |
|
END |
7140 |
< |
^ |
6985 |
< |
|
7140 |
> |
^ |
7141 |
|
|
7142 |
< |
ALTER PROCEDURE SUB_TOT_BUDGET |
7142 |
> |
ALTER PROCEDURE SUB_TOT_BUDGET |
7143 |
|
( |
7144 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
7145 |
|
) |
7146 |
|
RETURNS |
7147 |
|
( |
7148 |
< |
TOT_BUDGET DECIMAL(12, 2), |
7149 |
< |
AVG_BUDGET DECIMAL(12, 2), |
7150 |
< |
MIN_BUDGET DECIMAL(12, 2), |
7151 |
< |
MAX_BUDGET DECIMAL(12, 2) |
7148 |
> |
TOT_BUDGET DECIMAL(12,2), |
7149 |
> |
AVG_BUDGET DECIMAL(12,2), |
7150 |
> |
MIN_BUDGET DECIMAL(12,2), |
7151 |
> |
MAX_BUDGET DECIMAL(12,2) |
7152 |
|
) |
7153 |
|
AS |
7154 |
|
BEGIN |
7158 |
|
INTO :tot_budget, :avg_budget, :min_budget, :max_budget; |
7159 |
|
SUSPEND; |
7160 |
|
END |
7161 |
< |
^ |
7007 |
< |
|
7161 |
> |
^ |
7162 |
|
|
7163 |
< |
ALTER PROCEDURE "UC SPACE" |
7163 |
> |
ALTER PROCEDURE "UC SPACE" |
7164 |
|
( |
7165 |
|
ARG1 INTEGER |
7166 |
|
) |
7167 |
|
AS |
7168 |
|
Begin End |
7169 |
< |
^ |
7016 |
< |
|
7169 |
> |
^ |
7170 |
|
|
7171 |
< |
ALTER PROCEDURE "iCASE" |
7171 |
> |
ALTER PROCEDURE "iCASE" |
7172 |
|
AS |
7173 |
|
Begin End |
7174 |
< |
^ |
7174 |
> |
^ |
7175 |
|
|
7176 |
< |
SET TERM ; ^ |
7176 |
> |
SET TERM ;^ |
7177 |
|
COMMIT WORK; |
7178 |
|
SET AUTODDL ON; |
7179 |
|
COMMIT WORK; |
7180 |
|
SET AUTODDL OFF; |
7181 |
< |
SET TERM ^ ; |
7181 |
> |
SET TERM ^; |
7182 |
|
|
7183 |
|
/* Stored Function Body */ |
7184 |
|
|
7185 |
|
ALTER FUNCTION F (X INTEGER) |
7186 |
|
RETURNS INTEGER |
7187 |
< |
AS |
7187 |
> |
AS |
7188 |
|
BEGIN |
7189 |
|
RETURN X+1; |
7190 |
|
END |
7191 |
|
^ |
7192 |
|
|
7193 |
< |
|
7041 |
< |
SET TERM ; ^ |
7193 |
> |
SET TERM ;^ |
7194 |
|
COMMIT WORK; |
7195 |
|
SET AUTODDL ON; |
7196 |
|
|
7267 |
|
/* Domain definitions */ |
7268 |
|
|
7269 |
|
CREATE DOMAIN ADDRESSLINE AS VARCHAR(30); |
7270 |
< |
CREATE DOMAIN BUDGET AS DECIMAL(12, 2) |
7270 |
> |
CREATE DOMAIN BUDGET AS DECIMAL(12,2) |
7271 |
|
DEFAULT 50000; |
7272 |
|
CREATE DOMAIN COUNTRYNAME AS VARCHAR(15); |
7273 |
|
CREATE DOMAIN CUSTNO AS INTEGER; |
7283 |
|
CREATE DOMAIN PRODTYPE AS VARCHAR(12) |
7284 |
|
DEFAULT 'software' NOT NULL; |
7285 |
|
CREATE DOMAIN PROJNO AS CHAR(5); |
7286 |
< |
CREATE DOMAIN SALARY AS NUMERIC(10, 2) |
7286 |
> |
CREATE DOMAIN SALARY AS NUMERIC(10,2) |
7287 |
|
DEFAULT 0; |
7288 |
|
|
7289 |
|
/* Table: COUNTRIES, Owner: SYSDBA */ |
7290 |
|
|
7291 |
< |
CREATE TABLE COUNTRIES |
7291 |
> |
CREATE TABLE COUNTRIES |
7292 |
|
( |
7293 |
|
COUNTRY VARCHAR(64) NOT NULL, |
7294 |
|
NONEU SMALLINT, |
7301 |
|
|
7302 |
|
/* Table: COUNTRY, Owner: SYSDBA */ |
7303 |
|
|
7304 |
< |
CREATE TABLE COUNTRY |
7304 |
> |
CREATE TABLE COUNTRY |
7305 |
|
( |
7306 |
|
COUNTRY COUNTRYNAME NOT NULL, |
7307 |
|
CURRENCY VARCHAR(10) NOT NULL, |
7310 |
|
|
7311 |
|
/* Table: CUSTOMER, Owner: SYSDBA */ |
7312 |
|
|
7313 |
< |
CREATE TABLE CUSTOMER |
7313 |
> |
CREATE TABLE CUSTOMER |
7314 |
|
( |
7315 |
|
CUST_NO CUSTNO NOT NULL, |
7316 |
|
CUSTOMER VARCHAR(25) NOT NULL, |
7330 |
|
|
7331 |
|
/* Table: DEPARTMENT, Owner: SYSDBA */ |
7332 |
|
|
7333 |
< |
CREATE TABLE DEPARTMENT |
7333 |
> |
CREATE TABLE DEPARTMENT |
7334 |
|
( |
7335 |
|
DEPT_NO DEPTNO NOT NULL, |
7336 |
|
DEPARTMENT VARCHAR(25) NOT NULL, |
7345 |
|
|
7346 |
|
/* Table: EMPLOYEE, Owner: SYSDBA */ |
7347 |
|
|
7348 |
< |
CREATE TABLE EMPLOYEE |
7348 |
> |
CREATE TABLE EMPLOYEE |
7349 |
|
( |
7350 |
|
EMP_NO EMPNO NOT NULL, |
7351 |
|
FIRST_NAME FIRSTNAME NOT NULL, |
7363 |
|
|
7364 |
|
/* Table: EMPLOYEE_PROJECT, Owner: SYSDBA */ |
7365 |
|
|
7366 |
< |
CREATE TABLE EMPLOYEE_PROJECT |
7366 |
> |
CREATE TABLE EMPLOYEE_PROJECT |
7367 |
|
( |
7368 |
|
EMP_NO EMPNO NOT NULL, |
7369 |
|
PROJ_ID PROJNO NOT NULL, |
7372 |
|
|
7373 |
|
/* Table: FB$OUT_TABLE, Owner: SYSDBA */ |
7374 |
|
|
7375 |
< |
CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE |
7375 |
> |
CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE |
7376 |
|
( |
7377 |
|
LINE_NUM INTEGER, |
7378 |
|
CONTENT FB$OUT_TYPE |
7380 |
|
|
7381 |
|
/* Table: ITEST, Owner: SYSDBA */ |
7382 |
|
|
7383 |
< |
CREATE TABLE ITEST |
7383 |
> |
CREATE TABLE ITEST |
7384 |
|
( |
7385 |
|
"KEY" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL, |
7386 |
|
SOMETEXT VARCHAR(64), |
7389 |
|
|
7390 |
|
/* Table: ITEST2, Owner: SYSDBA */ |
7391 |
|
|
7392 |
< |
CREATE TABLE ITEST2 |
7392 |
> |
CREATE TABLE ITEST2 |
7393 |
|
( |
7394 |
|
"KEY" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL, |
7395 |
|
SOMETEXT VARCHAR(64), |
7398 |
|
|
7399 |
|
/* Table: JOB, Owner: SYSDBA */ |
7400 |
|
|
7401 |
< |
CREATE TABLE JOB |
7401 |
> |
CREATE TABLE JOB |
7402 |
|
( |
7403 |
|
JOB_CODE JOBCODE NOT NULL, |
7404 |
|
JOB_GRADE JOBGRADE NOT NULL, |
7413 |
|
|
7414 |
|
/* Table: PROJECT, Owner: SYSDBA */ |
7415 |
|
|
7416 |
< |
CREATE TABLE PROJECT |
7416 |
> |
CREATE TABLE PROJECT |
7417 |
|
( |
7418 |
|
PROJ_ID PROJNO NOT NULL, |
7419 |
|
PROJ_NAME VARCHAR(20) NOT NULL, |
7426 |
|
|
7427 |
|
/* Table: PROJ_DEPT_BUDGET, Owner: SYSDBA */ |
7428 |
|
|
7429 |
< |
CREATE TABLE PROJ_DEPT_BUDGET |
7429 |
> |
CREATE TABLE PROJ_DEPT_BUDGET |
7430 |
|
( |
7431 |
|
FISCAL_YEAR INTEGER NOT NULL, |
7432 |
|
PROJ_ID PROJNO NOT NULL, |
7438 |
|
|
7439 |
|
/* Table: SALARY_HISTORY, Owner: SYSDBA */ |
7440 |
|
|
7441 |
< |
CREATE TABLE SALARY_HISTORY |
7441 |
> |
CREATE TABLE SALARY_HISTORY |
7442 |
|
( |
7443 |
|
EMP_NO EMPNO NOT NULL, |
7444 |
|
CHANGE_DATE TIMESTAMP DEFAULT 'NOW' NOT NULL, |
7451 |
|
|
7452 |
|
/* Table: SALES, Owner: SYSDBA */ |
7453 |
|
|
7454 |
< |
CREATE TABLE SALES |
7454 |
> |
CREATE TABLE SALES |
7455 |
|
( |
7456 |
|
PO_NUMBER PONUMBER NOT NULL, |
7457 |
|
CUST_NO CUSTNO NOT NULL, |
7462 |
|
DATE_NEEDED TIMESTAMP, |
7463 |
|
PAID CHAR(1) DEFAULT 'n', |
7464 |
|
QTY_ORDERED INTEGER DEFAULT 1 NOT NULL, |
7465 |
< |
TOTAL_VALUE DECIMAL(9, 2) NOT NULL, |
7465 |
> |
TOTAL_VALUE DECIMAL(9,2) NOT NULL, |
7466 |
|
DISCOUNT FLOAT DEFAULT 0 NOT NULL, |
7467 |
|
ITEM_TYPE PRODTYPE, |
7468 |
|
AGED COMPUTED BY (ship_date - order_date), |
7475 |
|
TIMESTAMP, INTEGER |
7476 |
|
RETURNS TIMESTAMP |
7477 |
|
ENTRY_POINT 'addDay' MODULE_NAME 'fbudf' |
7326 |
– |
|
7478 |
|
; |
7479 |
|
|
7480 |
|
|
7481 |
|
DECLARE EXTERNAL FUNCTION I64TRUNCATE |
7482 |
< |
NUMERIC(18, 0) BY DESCRIPTOR, NUMERIC(18, 0) BY DESCRIPTOR |
7482 |
> |
NUMERIC(18,0) BY DESCRIPTOR, NUMERIC(18,0) BY DESCRIPTOR |
7483 |
|
RETURNS PARAMETER 2 |
7484 |
|
ENTRY_POINT 'fbtruncate' MODULE_NAME 'fbudf' |
7334 |
– |
|
7485 |
|
; |
7486 |
|
|
7487 |
|
|
7489 |
|
TIMESTAMP, INTEGER NULL, CSTRING(10) CHARACTER SET NONE, CSTRING(10) CHARACTER SET NONE BY DESCRIPTOR |
7490 |
|
RETURNS CSTRING(32) CHARACTER SET NONE FREE_IT |
7491 |
|
ENTRY_POINT 'testit' MODULE_NAME 'fbudf' |
7342 |
– |
|
7492 |
|
; |
7493 |
|
|
7494 |
|
|
8221 |
|
ALTER TABLE SALES ADD FOREIGN KEY (SALES_REP) REFERENCES EMPLOYEE (EMP_NO); |
8222 |
|
|
8223 |
|
CREATE SEQUENCE CUST_NO_GEN; |
8224 |
< |
ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1015; |
8224 |
> |
ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1016; |
8225 |
|
CREATE SEQUENCE EMP_NO_GEN; |
8226 |
< |
ALTER SEQUENCE EMP_NO_GEN RESTART WITH 157; |
8226 |
> |
ALTER SEQUENCE EMP_NO_GEN RESTART WITH 158; |
8227 |
|
CREATE SEQUENCE FB$OUT_SEQ; |
8228 |
< |
ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 0; |
8228 |
> |
ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 1; |
8229 |
|
|
8230 |
|
/* View: DEPTLIST, Owner: SYSDBA */ |
8231 |
|
|
8232 |
|
CREATE VIEW DEPTLIST ( |
8233 |
< |
EMP_NO, |
8234 |
< |
FIRST_NAME, |
8235 |
< |
LAST_NAME, |
8236 |
< |
PHONE_EXT, |
8237 |
< |
HIRE_DATE, |
8238 |
< |
DEPT_NO, |
8239 |
< |
JOB_CODE, |
8240 |
< |
JOB_GRADE, |
8241 |
< |
JOB_COUNTRY, |
8242 |
< |
SALARY, |
8243 |
< |
FULL_NAME, |
8244 |
< |
DEPT_PATH, |
8245 |
< |
DEPT_KEY_PATH |
8233 |
> |
EMP_NO, |
8234 |
> |
FIRST_NAME, |
8235 |
> |
LAST_NAME, |
8236 |
> |
PHONE_EXT, |
8237 |
> |
HIRE_DATE, |
8238 |
> |
DEPT_NO, |
8239 |
> |
JOB_CODE, |
8240 |
> |
JOB_GRADE, |
8241 |
> |
JOB_COUNTRY, |
8242 |
> |
SALARY, |
8243 |
> |
FULL_NAME, |
8244 |
> |
DEPT_PATH, |
8245 |
> |
DEPT_KEY_PATH, |
8246 |
> |
"Payment Status" |
8247 |
|
) AS |
8248 |
|
with recursive Depts As ( |
8249 |
|
Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar(256)) as DEPT_PATH, |
8257 |
|
) |
8258 |
|
|
8259 |
|
Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, |
8260 |
< |
A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH |
8260 |
> |
A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH, |
8261 |
> |
CASE When A.SALARY > 10000 then 'higher paid' else 'lower paid' End |
8262 |
|
From EMPLOYEE A |
8263 |
|
JOIN Depts D On D.DEPT_NO = A.DEPT_NO |
8264 |
|
; |
8266 |
|
/* View: PHONE_LIST, Owner: SYSDBA */ |
8267 |
|
|
8268 |
|
CREATE VIEW PHONE_LIST ( |
8269 |
< |
EMP_NO, |
8270 |
< |
FIRST_NAME, |
8271 |
< |
LAST_NAME, |
8272 |
< |
PHONE_EXT, |
8273 |
< |
LOCATION, |
8269 |
> |
EMP_NO, |
8270 |
> |
FIRST_NAME, |
8271 |
> |
LAST_NAME, |
8272 |
> |
PHONE_EXT, |
8273 |
> |
LOCATION, |
8274 |
|
PHONE_NO |
8275 |
|
) AS |
8276 |
|
SELECT |
8372 |
|
CREATE EXCEPTION UNKNOWN_EMP_ID 'Invalid employee number or project id.'; |
8373 |
|
COMMIT WORK; |
8374 |
|
SET AUTODDL OFF; |
8375 |
< |
SET TERM ^ ; |
8375 |
> |
SET TERM ^; |
8376 |
|
|
8377 |
|
/* Package Definitions */ |
8378 |
|
|
8379 |
< |
CREATE PACKAGE FB$OUT |
8379 |
> |
CREATE PACKAGE FB$OUT |
8380 |
|
AS |
8230 |
– |
|
8381 |
|
begin |
8382 |
|
procedure enable; |
8383 |
|
procedure disable; |
8387 |
|
|
8388 |
|
procedure get_lines returns (lines fb$out_type); |
8389 |
|
end |
8390 |
< |
^ |
8390 |
> |
^ |
8391 |
|
|
8392 |
< |
CREATE PACKAGE SELECT$TEST |
8392 |
> |
CREATE PACKAGE SELECT$TEST |
8393 |
|
AS |
8244 |
– |
|
8394 |
|
Begin |
8395 |
|
Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer); |
8396 |
|
End |
8397 |
< |
^ |
8397 |
> |
^ |
8398 |
|
|
8399 |
< |
SET TERM ; ^ |
8399 |
> |
SET TERM ;^ |
8400 |
|
COMMIT WORK; |
8401 |
|
SET AUTODDL ON; |
8402 |
|
COMMIT WORK; |
8403 |
|
SET AUTODDL OFF; |
8404 |
< |
SET TERM ^ ; |
8404 |
> |
SET TERM ^; |
8405 |
|
|
8406 |
|
/* Stored procedures Definitions*/ |
8407 |
|
|
8408 |
< |
CREATE PROCEDURE SHOW_LANGS |
8408 |
> |
CREATE PROCEDURE SHOW_LANGS |
8409 |
|
( |
8410 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
8411 |
|
GRADE SMALLINT, |
8417 |
|
) |
8418 |
|
AS |
8419 |
|
BEGIN SUSPEND; EXIT; END |
8271 |
– |
|
8420 |
|
^ |
8421 |
|
|
8422 |
< |
CREATE PROCEDURE ADD_EMP_PROJ |
8422 |
> |
CREATE PROCEDURE ADD_EMP_PROJ |
8423 |
|
( |
8424 |
|
EMP_NO SMALLINT, |
8425 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
8426 |
|
) |
8427 |
|
AS |
8428 |
|
BEGIN EXIT; END |
8281 |
– |
|
8429 |
|
^ |
8430 |
|
|
8431 |
< |
CREATE PROCEDURE ALL_LANGS |
8431 |
> |
CREATE PROCEDURE ALL_LANGS |
8432 |
|
RETURNS |
8433 |
|
( |
8434 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
8438 |
|
) |
8439 |
|
AS |
8440 |
|
BEGIN SUSPEND; EXIT; END |
8294 |
– |
|
8441 |
|
^ |
8442 |
|
|
8443 |
< |
CREATE PROCEDURE DELETE_EMPLOYEE |
8443 |
> |
CREATE PROCEDURE DELETE_EMPLOYEE |
8444 |
|
( |
8445 |
|
EMP_NUM INTEGER |
8446 |
|
) |
8447 |
|
AS |
8448 |
|
BEGIN EXIT; END |
8303 |
– |
|
8449 |
|
^ |
8450 |
|
|
8451 |
< |
CREATE PROCEDURE DEPT_BUDGET |
8451 |
> |
CREATE PROCEDURE DEPT_BUDGET |
8452 |
|
( |
8453 |
|
DNO CHAR(3) CHARACTER SET NONE |
8454 |
|
) |
8455 |
|
RETURNS |
8456 |
|
( |
8457 |
< |
TOT DECIMAL(12, 2) |
8457 |
> |
TOT DECIMAL(12,2) |
8458 |
|
) |
8459 |
|
AS |
8460 |
|
BEGIN SUSPEND; EXIT; END |
8461 |
+ |
^ |
8462 |
|
|
8463 |
+ |
CREATE PROCEDURE EMPLOYEE_PAY_STATUS |
8464 |
+ |
( |
8465 |
+ |
EMP_NUM SMALLINT |
8466 |
+ |
) |
8467 |
+ |
RETURNS |
8468 |
+ |
( |
8469 |
+ |
PAY_STATUS VARCHAR(6) CHARACTER SET NONE, |
8470 |
+ |
SALARY NUMERIC(10,2) |
8471 |
+ |
) |
8472 |
+ |
AS |
8473 |
+ |
BEGIN EXIT; END |
8474 |
|
^ |
8475 |
|
|
8476 |
< |
CREATE PROCEDURE GET_EMP_PROJ |
8476 |
> |
CREATE PROCEDURE GET_EMP_PROJ |
8477 |
|
( |
8478 |
|
EMP_NO SMALLINT |
8479 |
|
) |
8483 |
|
) |
8484 |
|
AS |
8485 |
|
BEGIN SUSPEND; EXIT; END |
8329 |
– |
|
8486 |
|
^ |
8487 |
|
|
8488 |
< |
CREATE PROCEDURE "Has Space" |
8488 |
> |
CREATE PROCEDURE "Has Space" |
8489 |
|
( |
8490 |
|
ARG1 INTEGER |
8491 |
|
) |
8492 |
|
AS |
8493 |
|
BEGIN EXIT; END |
8338 |
– |
|
8494 |
|
^ |
8495 |
|
|
8496 |
< |
CREATE PROCEDURE MAIL_LABEL |
8496 |
> |
CREATE PROCEDURE MAIL_LABEL |
8497 |
|
( |
8498 |
|
CUST_NO INTEGER |
8499 |
|
) |
8508 |
|
) |
8509 |
|
AS |
8510 |
|
BEGIN SUSPEND; EXIT; END |
8356 |
– |
|
8511 |
|
^ |
8512 |
|
|
8513 |
< |
CREATE PROCEDURE ORG_CHART |
8513 |
> |
CREATE PROCEDURE ORG_CHART |
8514 |
|
RETURNS |
8515 |
|
( |
8516 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
8521 |
|
) |
8522 |
|
AS |
8523 |
|
BEGIN SUSPEND; EXIT; END |
8370 |
– |
|
8524 |
|
^ |
8525 |
|
|
8526 |
< |
CREATE PROCEDURE SHIP_ORDER |
8526 |
> |
CREATE PROCEDURE SHIP_ORDER |
8527 |
|
( |
8528 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
8529 |
|
) |
8530 |
|
AS |
8531 |
|
BEGIN EXIT; END |
8379 |
– |
|
8532 |
|
^ |
8533 |
|
|
8534 |
< |
CREATE PROCEDURE SUB_TOT_BUDGET |
8534 |
> |
CREATE PROCEDURE SUB_TOT_BUDGET |
8535 |
|
( |
8536 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
8537 |
|
) |
8538 |
|
RETURNS |
8539 |
|
( |
8540 |
< |
TOT_BUDGET DECIMAL(12, 2), |
8541 |
< |
AVG_BUDGET DECIMAL(12, 2), |
8542 |
< |
MIN_BUDGET DECIMAL(12, 2), |
8543 |
< |
MAX_BUDGET DECIMAL(12, 2) |
8540 |
> |
TOT_BUDGET DECIMAL(12,2), |
8541 |
> |
AVG_BUDGET DECIMAL(12,2), |
8542 |
> |
MIN_BUDGET DECIMAL(12,2), |
8543 |
> |
MAX_BUDGET DECIMAL(12,2) |
8544 |
|
) |
8545 |
|
AS |
8546 |
|
BEGIN SUSPEND; EXIT; END |
8395 |
– |
|
8547 |
|
^ |
8548 |
|
|
8549 |
< |
CREATE PROCEDURE "UC SPACE" |
8549 |
> |
CREATE PROCEDURE "UC SPACE" |
8550 |
|
( |
8551 |
|
ARG1 INTEGER |
8552 |
|
) |
8553 |
|
AS |
8554 |
|
BEGIN EXIT; END |
8404 |
– |
|
8555 |
|
^ |
8556 |
|
|
8557 |
< |
CREATE PROCEDURE "iCASE" |
8557 |
> |
CREATE PROCEDURE "iCASE" |
8558 |
|
AS |
8559 |
|
BEGIN EXIT; END |
8410 |
– |
|
8560 |
|
^ |
8561 |
|
|
8562 |
< |
SET TERM ; ^ |
8562 |
> |
SET TERM ;^ |
8563 |
|
COMMIT WORK; |
8564 |
|
SET AUTODDL ON; |
8565 |
|
COMMIT WORK; |
8566 |
|
SET AUTODDL OFF; |
8567 |
< |
SET TERM ^ ; |
8567 |
> |
SET TERM ^; |
8568 |
|
|
8569 |
|
/* Stored Function declarations */ |
8570 |
|
|
8571 |
|
CREATE FUNCTION F (X INTEGER) |
8572 |
|
RETURNS INTEGER |
8573 |
|
AS BEGIN END |
8425 |
– |
|
8574 |
|
^ |
8575 |
|
|
8576 |
< |
|
8429 |
< |
SET TERM ; ^ |
8576 |
> |
SET TERM ;^ |
8577 |
|
COMMIT WORK; |
8578 |
|
SET AUTODDL ON; |
8579 |
< |
SET TERM ^ ; |
8579 |
> |
SET TERM ^; |
8580 |
|
|
8581 |
|
|
8582 |
|
/* Triggers only will work for SQL triggers */ |
8586 |
|
as |
8587 |
|
begin |
8588 |
|
End |
8589 |
< |
^ |
8589 |
> |
^ |
8590 |
> |
|
8591 |
|
CREATE TRIGGER "BEFORE CREATE TABLE" |
8592 |
|
ACTIVE BEFORE CREATE TABLE POSITION 0 |
8593 |
|
AS BEGIN END |
8594 |
< |
^ |
8594 |
> |
^ |
8595 |
> |
|
8596 |
|
CREATE TRIGGER "AFTER CREATE TABLE" |
8597 |
|
ACTIVE AFTER CREATE TABLE POSITION 0 |
8598 |
|
AS BEGIN END |
8599 |
< |
^ |
8599 |
> |
^ |
8600 |
> |
|
8601 |
|
CREATE TRIGGER "BEFORE ALTER TABLE" |
8602 |
|
ACTIVE BEFORE ALTER TABLE POSITION 0 |
8603 |
|
AS BEGIN END |
8604 |
< |
^ |
8604 |
> |
^ |
8605 |
> |
|
8606 |
|
CREATE TRIGGER "AFTER ALTER TABLE" |
8607 |
|
ACTIVE AFTER ALTER TABLE POSITION 0 |
8608 |
|
AS BEGIN END |
8609 |
< |
^ |
8609 |
> |
^ |
8610 |
> |
|
8611 |
|
CREATE TRIGGER "AFTER CREATE/Alter TABLE" |
8612 |
|
ACTIVE AFTER CREATE TABLE OR ALTER TABLE POSITION 0 |
8613 |
|
AS BEGIN END |
8614 |
< |
^ |
8614 |
> |
^ |
8615 |
> |
|
8616 |
|
CREATE TRIGGER "BEFORE DROP TABLE" |
8617 |
|
ACTIVE BEFORE Drop TABLE POSITION 0 |
8618 |
|
AS BEGIN END |
8619 |
< |
^ |
8619 |
> |
^ |
8620 |
> |
|
8621 |
|
CREATE TRIGGER "AFTER DROP TABLE" |
8622 |
|
ACTIVE AFTER Drop TABLE POSITION 0 |
8623 |
|
AS BEGIN END |
8624 |
< |
^ |
8624 |
> |
^ |
8625 |
> |
|
8626 |
|
CREATE TRIGGER "BEFORE CREATE PROCEDURE" |
8627 |
|
ACTIVE BEFORE CREATE PROCEDURE POSITION 0 |
8628 |
|
AS BEGIN END |
8629 |
< |
^ |
8629 |
> |
^ |
8630 |
> |
|
8631 |
|
CREATE TRIGGER "AFTER CREATE PROCEDURE" |
8632 |
|
ACTIVE AFTER CREATE PROCEDURE POSITION 0 |
8633 |
|
AS BEGIN END |
8634 |
< |
^ |
8634 |
> |
^ |
8635 |
> |
|
8636 |
|
CREATE TRIGGER "BEFORE ALTER PROCEDURE" |
8637 |
|
ACTIVE BEFORE ALTER PROCEDURE POSITION 0 |
8638 |
|
AS BEGIN END |
8639 |
< |
^ |
8639 |
> |
^ |
8640 |
> |
|
8641 |
|
CREATE TRIGGER "AFTER ALTER PROCEDURE" |
8642 |
|
ACTIVE AFTER ALTER PROCEDURE POSITION 0 |
8643 |
|
AS BEGIN END |
8644 |
< |
^ |
8644 |
> |
^ |
8645 |
> |
|
8646 |
|
CREATE TRIGGER "BEFORE DROP PROCEDURE" |
8647 |
|
ACTIVE BEFORE Drop PROCEDURE POSITION 0 |
8648 |
|
AS BEGIN END |
8649 |
< |
^ |
8649 |
> |
^ |
8650 |
> |
|
8651 |
|
CREATE TRIGGER "AFTER DROP PROCEDURE" |
8652 |
|
ACTIVE AFTER Drop PROCEDURE POSITION 0 |
8653 |
|
AS BEGIN END |
8654 |
< |
^ |
8654 |
> |
^ |
8655 |
> |
|
8656 |
|
CREATE TRIGGER "BEFORE CREATE FUNCTION" |
8657 |
|
ACTIVE BEFORE CREATE FUNCTION POSITION 0 |
8658 |
|
AS BEGIN END |
8659 |
< |
^ |
8659 |
> |
^ |
8660 |
> |
|
8661 |
|
CREATE TRIGGER "AFTER CREATE FUNCTION" |
8662 |
|
ACTIVE AFTER CREATE FUNCTION POSITION 0 |
8663 |
|
AS BEGIN END |
8664 |
< |
^ |
8664 |
> |
^ |
8665 |
> |
|
8666 |
|
CREATE TRIGGER "BEFORE ALTER FUNCTION" |
8667 |
|
ACTIVE BEFORE ALTER FUNCTION POSITION 0 |
8668 |
|
AS BEGIN END |
8669 |
< |
^ |
8669 |
> |
^ |
8670 |
> |
|
8671 |
|
CREATE TRIGGER "AFTER ALTER FUNCTION" |
8672 |
|
ACTIVE AFTER ALTER FUNCTION POSITION 0 |
8673 |
|
AS BEGIN END |
8674 |
< |
^ |
8674 |
> |
^ |
8675 |
> |
|
8676 |
|
CREATE TRIGGER "BEFORE DROP FUNCTION" |
8677 |
|
ACTIVE BEFORE Drop FUNCTION POSITION 0 |
8678 |
|
AS BEGIN END |
8679 |
< |
^ |
8679 |
> |
^ |
8680 |
> |
|
8681 |
|
CREATE TRIGGER "AFTER DROP FUNCTION" |
8682 |
|
ACTIVE AFTER Drop FUNCTION POSITION 0 |
8683 |
|
AS BEGIN END |
8684 |
< |
^ |
8684 |
> |
^ |
8685 |
> |
|
8686 |
|
CREATE TRIGGER "BEFORE CREATE TRIGGER" |
8687 |
|
ACTIVE BEFORE CREATE TRIGGER POSITION 0 |
8688 |
|
AS BEGIN END |
8689 |
< |
^ |
8689 |
> |
^ |
8690 |
> |
|
8691 |
|
CREATE TRIGGER "AFTER CREATE TRIGGER" |
8692 |
|
ACTIVE AFTER CREATE TRIGGER POSITION 0 |
8693 |
|
AS BEGIN END |
8694 |
< |
^ |
8694 |
> |
^ |
8695 |
> |
|
8696 |
|
CREATE TRIGGER "BEFORE ALTER TRIGGER" |
8697 |
|
ACTIVE BEFORE ALTER TRIGGER POSITION 0 |
8698 |
|
AS BEGIN END |
8699 |
< |
^ |
8699 |
> |
^ |
8700 |
> |
|
8701 |
|
CREATE TRIGGER "AFTER ALTER TRIGGER" |
8702 |
|
ACTIVE AFTER ALTER TRIGGER POSITION 0 |
8703 |
|
AS BEGIN END |
8704 |
< |
^ |
8704 |
> |
^ |
8705 |
> |
|
8706 |
|
CREATE TRIGGER "BEFORE DROP TRIGGER" |
8707 |
|
ACTIVE BEFORE Drop TRIGGER POSITION 0 |
8708 |
|
AS BEGIN END |
8709 |
< |
^ |
8709 |
> |
^ |
8710 |
> |
|
8711 |
|
CREATE TRIGGER "AFTER DROP TRIGGER" |
8712 |
|
ACTIVE AFTER Drop TRIGGER POSITION 0 |
8713 |
|
AS BEGIN END |
8714 |
< |
^ |
8714 |
> |
^ |
8715 |
> |
|
8716 |
|
CREATE TRIGGER "BEFORE CREATE EXCEPTION" |
8717 |
|
ACTIVE BEFORE CREATE EXCEPTION POSITION 0 |
8718 |
|
AS BEGIN END |
8719 |
< |
^ |
8719 |
> |
^ |
8720 |
> |
|
8721 |
|
CREATE TRIGGER "AFTER CREATE EXCEPTION" |
8722 |
|
ACTIVE AFTER CREATE EXCEPTION POSITION 0 |
8723 |
|
AS BEGIN END |
8724 |
< |
^ |
8724 |
> |
^ |
8725 |
> |
|
8726 |
|
CREATE TRIGGER "BEFORE ALTER EXCEPTION" |
8727 |
|
ACTIVE BEFORE ALTER EXCEPTION POSITION 0 |
8728 |
|
AS BEGIN END |
8729 |
< |
^ |
8729 |
> |
^ |
8730 |
> |
|
8731 |
|
CREATE TRIGGER "AFTER ALTER EXCEPTION" |
8732 |
|
ACTIVE AFTER ALTER EXCEPTION POSITION 0 |
8733 |
|
AS BEGIN END |
8734 |
< |
^ |
8734 |
> |
^ |
8735 |
> |
|
8736 |
|
CREATE TRIGGER "BEFORE DROP EXCEPTION" |
8737 |
|
ACTIVE BEFORE Drop EXCEPTION POSITION 0 |
8738 |
|
AS BEGIN END |
8739 |
< |
^ |
8739 |
> |
^ |
8740 |
> |
|
8741 |
|
CREATE TRIGGER "AFTER DROP EXCEPTION" |
8742 |
|
ACTIVE AFTER Drop EXCEPTION POSITION 0 |
8743 |
|
AS BEGIN END |
8744 |
< |
^ |
8744 |
> |
^ |
8745 |
> |
|
8746 |
|
CREATE TRIGGER "BEFORE CREATE VIEW" |
8747 |
|
ACTIVE BEFORE CREATE VIEW POSITION 0 |
8748 |
|
AS BEGIN END |
8749 |
< |
^ |
8749 |
> |
^ |
8750 |
> |
|
8751 |
|
CREATE TRIGGER "AFTER CREATE VIEW" |
8752 |
|
ACTIVE AFTER CREATE VIEW POSITION 0 |
8753 |
|
AS BEGIN END |
8754 |
< |
^ |
8754 |
> |
^ |
8755 |
> |
|
8756 |
|
CREATE TRIGGER "BEFORE ALTER VIEW" |
8757 |
|
ACTIVE BEFORE ALTER VIEW POSITION 0 |
8758 |
|
AS BEGIN END |
8759 |
< |
^ |
8759 |
> |
^ |
8760 |
> |
|
8761 |
|
CREATE TRIGGER "AFTER ALTER VIEW" |
8762 |
|
ACTIVE AFTER ALTER VIEW POSITION 0 |
8763 |
|
AS BEGIN END |
8764 |
< |
^ |
8764 |
> |
^ |
8765 |
> |
|
8766 |
|
CREATE TRIGGER "BEFORE DROP VIEW" |
8767 |
|
ACTIVE BEFORE Drop VIEW POSITION 0 |
8768 |
|
AS BEGIN END |
8769 |
< |
^ |
8769 |
> |
^ |
8770 |
> |
|
8771 |
|
CREATE TRIGGER "AFTER DROP VIEW" |
8772 |
|
ACTIVE AFTER Drop VIEW POSITION 0 |
8773 |
|
AS BEGIN END |
8774 |
< |
^ |
8774 |
> |
^ |
8775 |
> |
|
8776 |
|
CREATE TRIGGER "BEFORE CREATE DOMAIN" |
8777 |
|
ACTIVE BEFORE CREATE DOMAIN POSITION 0 |
8778 |
|
AS BEGIN END |
8779 |
< |
^ |
8779 |
> |
^ |
8780 |
> |
|
8781 |
|
CREATE TRIGGER "AFTER CREATE DOMAIN" |
8782 |
|
ACTIVE AFTER CREATE DOMAIN POSITION 0 |
8783 |
|
AS BEGIN END |
8784 |
< |
^ |
8784 |
> |
^ |
8785 |
> |
|
8786 |
|
CREATE TRIGGER "BEFORE ALTER DOMAIN" |
8787 |
|
ACTIVE BEFORE ALTER DOMAIN POSITION 0 |
8788 |
|
AS BEGIN END |
8789 |
< |
^ |
8789 |
> |
^ |
8790 |
> |
|
8791 |
|
CREATE TRIGGER "AFTER ALTER DOMAIN" |
8792 |
|
ACTIVE AFTER ALTER DOMAIN POSITION 0 |
8793 |
|
AS BEGIN END |
8794 |
< |
^ |
8794 |
> |
^ |
8795 |
> |
|
8796 |
|
CREATE TRIGGER "BEFORE DROP DOMAIN" |
8797 |
|
ACTIVE BEFORE Drop DOMAIN POSITION 0 |
8798 |
|
AS BEGIN END |
8799 |
< |
^ |
8799 |
> |
^ |
8800 |
> |
|
8801 |
|
CREATE TRIGGER "AFTER DROP DOMAIN" |
8802 |
|
ACTIVE AFTER Drop DOMAIN POSITION 0 |
8803 |
|
AS BEGIN END |
8804 |
< |
^ |
8804 |
> |
^ |
8805 |
> |
|
8806 |
|
CREATE TRIGGER "BEFORE CREATE ROLE" |
8807 |
|
ACTIVE BEFORE CREATE ROLE POSITION 0 |
8808 |
|
AS BEGIN END |
8809 |
< |
^ |
8809 |
> |
^ |
8810 |
> |
|
8811 |
|
CREATE TRIGGER "AFTER CREATE ROLE" |
8812 |
|
ACTIVE AFTER CREATE ROLE POSITION 0 |
8813 |
|
AS BEGIN END |
8814 |
< |
^ |
8814 |
> |
^ |
8815 |
> |
|
8816 |
|
CREATE TRIGGER "BEFORE ALTER ROLE" |
8817 |
|
ACTIVE BEFORE ALTER ROLE POSITION 0 |
8818 |
|
AS BEGIN END |
8819 |
< |
^ |
8819 |
> |
^ |
8820 |
> |
|
8821 |
|
CREATE TRIGGER "AFTER ALTER ROLE" |
8822 |
|
ACTIVE AFTER ALTER ROLE POSITION 0 |
8823 |
|
AS BEGIN END |
8824 |
< |
^ |
8824 |
> |
^ |
8825 |
> |
|
8826 |
|
CREATE TRIGGER "BEFORE DROP ROLE" |
8827 |
|
ACTIVE BEFORE Drop ROLE POSITION 0 |
8828 |
|
AS BEGIN END |
8829 |
< |
^ |
8829 |
> |
^ |
8830 |
> |
|
8831 |
|
CREATE TRIGGER "AFTER DROP ROLE" |
8832 |
|
ACTIVE AFTER Drop ROLE POSITION 0 |
8833 |
|
AS BEGIN END |
8834 |
< |
^ |
8834 |
> |
^ |
8835 |
> |
|
8836 |
|
CREATE TRIGGER "BEFORE CREATE INDEX" |
8837 |
|
ACTIVE BEFORE CREATE INDEX POSITION 0 |
8838 |
|
AS BEGIN END |
8839 |
< |
^ |
8839 |
> |
^ |
8840 |
> |
|
8841 |
|
CREATE TRIGGER "AFTER CREATE INDEX" |
8842 |
|
ACTIVE AFTER CREATE INDEX POSITION 0 |
8843 |
|
AS BEGIN END |
8844 |
< |
^ |
8844 |
> |
^ |
8845 |
> |
|
8846 |
|
CREATE TRIGGER "BEFORE ALTER INDEX" |
8847 |
|
ACTIVE BEFORE ALTER INDEX POSITION 0 |
8848 |
|
AS BEGIN END |
8849 |
< |
^ |
8849 |
> |
^ |
8850 |
> |
|
8851 |
|
CREATE TRIGGER "AFTER ALTER INDEX" |
8852 |
|
ACTIVE AFTER ALTER INDEX POSITION 0 |
8853 |
|
AS BEGIN END |
8854 |
< |
^ |
8854 |
> |
^ |
8855 |
> |
|
8856 |
|
CREATE TRIGGER "BEFORE DROP INDEX" |
8857 |
|
ACTIVE BEFORE Drop INDEX POSITION 0 |
8858 |
|
AS BEGIN END |
8859 |
< |
^ |
8859 |
> |
^ |
8860 |
> |
|
8861 |
|
CREATE TRIGGER "AFTER DROP INDEX" |
8862 |
|
ACTIVE AFTER Drop INDEX POSITION 0 |
8863 |
|
AS BEGIN END |
8864 |
< |
^ |
8864 |
> |
^ |
8865 |
> |
|
8866 |
|
CREATE TRIGGER "BEFORE CREATE SEQUENCE" |
8867 |
|
ACTIVE BEFORE CREATE SEQUENCE POSITION 0 |
8868 |
|
AS BEGIN END |
8869 |
< |
^ |
8869 |
> |
^ |
8870 |
> |
|
8871 |
|
CREATE TRIGGER "AFTER CREATE SEQUENCE" |
8872 |
|
ACTIVE AFTER CREATE SEQUENCE POSITION 0 |
8873 |
|
AS BEGIN END |
8874 |
< |
^ |
8874 |
> |
^ |
8875 |
> |
|
8876 |
|
CREATE TRIGGER "BEFORE ALTER SEQUENCE" |
8877 |
|
ACTIVE BEFORE ALTER SEQUENCE POSITION 0 |
8878 |
|
AS BEGIN END |
8879 |
< |
^ |
8879 |
> |
^ |
8880 |
> |
|
8881 |
|
CREATE TRIGGER "AFTER ALTER SEQUENCE" |
8882 |
|
ACTIVE AFTER ALTER SEQUENCE POSITION 0 |
8883 |
|
AS BEGIN END |
8884 |
< |
^ |
8884 |
> |
^ |
8885 |
> |
|
8886 |
|
CREATE TRIGGER "BEFORE DROP SEQUENCE" |
8887 |
|
ACTIVE BEFORE Drop SEQUENCE POSITION 0 |
8888 |
|
AS BEGIN END |
8889 |
< |
^ |
8889 |
> |
^ |
8890 |
> |
|
8891 |
|
CREATE TRIGGER "AFTER DROP SEQUENCE" |
8892 |
|
ACTIVE AFTER Drop SEQUENCE POSITION 0 |
8893 |
|
AS BEGIN END |
8894 |
< |
^ |
8894 |
> |
^ |
8895 |
> |
|
8896 |
|
CREATE TRIGGER "BEFORE CREATE USER" |
8897 |
|
ACTIVE BEFORE CREATE USER POSITION 0 |
8898 |
|
AS BEGIN END |
8899 |
< |
^ |
8899 |
> |
^ |
8900 |
> |
|
8901 |
|
CREATE TRIGGER "AFTER CREATE USER" |
8902 |
|
ACTIVE AFTER CREATE USER POSITION 0 |
8903 |
|
AS BEGIN END |
8904 |
< |
^ |
8904 |
> |
^ |
8905 |
> |
|
8906 |
|
CREATE TRIGGER "BEFORE ALTER USER" |
8907 |
|
ACTIVE BEFORE ALTER USER POSITION 0 |
8908 |
|
AS BEGIN END |
8909 |
< |
^ |
8909 |
> |
^ |
8910 |
> |
|
8911 |
|
CREATE TRIGGER "AFTER ALTER USER" |
8912 |
|
ACTIVE AFTER ALTER USER POSITION 0 |
8913 |
|
AS BEGIN END |
8914 |
< |
^ |
8914 |
> |
^ |
8915 |
> |
|
8916 |
|
CREATE TRIGGER "BEFORE DROP USER" |
8917 |
|
ACTIVE BEFORE Drop USER POSITION 0 |
8918 |
|
AS BEGIN END |
8919 |
< |
^ |
8919 |
> |
^ |
8920 |
> |
|
8921 |
|
CREATE TRIGGER "AFTER DROP USER" |
8922 |
|
ACTIVE AFTER Drop USER POSITION 0 |
8923 |
|
AS BEGIN END |
8924 |
< |
^ |
8924 |
> |
^ |
8925 |
> |
|
8926 |
|
CREATE TRIGGER "BEFORE CREATE COLLATION" |
8927 |
|
ACTIVE BEFORE CREATE COLLATION POSITION 0 |
8928 |
|
AS BEGIN END |
8929 |
< |
^ |
8929 |
> |
^ |
8930 |
> |
|
8931 |
|
CREATE TRIGGER "AFTER CREATE COLLATION" |
8932 |
|
ACTIVE AFTER CREATE COLLATION POSITION 0 |
8933 |
|
AS BEGIN END |
8934 |
< |
^ |
8934 |
> |
^ |
8935 |
> |
|
8936 |
|
CREATE TRIGGER "BEFORE DROP COLLATION" |
8937 |
|
ACTIVE BEFORE Drop COLLATION POSITION 0 |
8938 |
|
AS BEGIN END |
8939 |
< |
^ |
8939 |
> |
^ |
8940 |
> |
|
8941 |
|
CREATE TRIGGER "AFTER DROP COLLATION" |
8942 |
|
ACTIVE AFTER Drop COLLATION POSITION 0 |
8943 |
|
AS BEGIN END |
8944 |
< |
^ |
8944 |
> |
^ |
8945 |
> |
|
8946 |
|
CREATE TRIGGER "BEFORE ALTER CHARACTER SET" |
8947 |
|
ACTIVE BEFORE ALTER CHARACTER SET POSITION 0 |
8948 |
|
AS BEGIN END |
8949 |
< |
^ |
8949 |
> |
^ |
8950 |
> |
|
8951 |
|
CREATE TRIGGER "AFTER ALTER CHARACTER SET" |
8952 |
|
ACTIVE AFTER ALTER CHARACTER SET POSITION 0 |
8953 |
|
AS BEGIN END |
8954 |
< |
^ |
8954 |
> |
^ |
8955 |
> |
|
8956 |
|
CREATE TRIGGER "BEFORE CREATE PACKAGE" |
8957 |
|
ACTIVE BEFORE CREATE PACKAGE POSITION 0 |
8958 |
|
AS BEGIN END |
8959 |
< |
^ |
8959 |
> |
^ |
8960 |
> |
|
8961 |
|
CREATE TRIGGER "AFTER CREATE PACKAGE" |
8962 |
|
ACTIVE AFTER CREATE PACKAGE POSITION 0 |
8963 |
|
AS BEGIN END |
8964 |
< |
^ |
8964 |
> |
^ |
8965 |
> |
|
8966 |
|
CREATE TRIGGER "BEFORE ALTER PACKAGE" |
8967 |
|
ACTIVE BEFORE ALTER PACKAGE POSITION 0 |
8968 |
|
AS BEGIN END |
8969 |
< |
^ |
8969 |
> |
^ |
8970 |
> |
|
8971 |
|
CREATE TRIGGER "AFTER ALTER PACKAGE" |
8972 |
|
ACTIVE AFTER ALTER PACKAGE POSITION 0 |
8973 |
|
AS BEGIN END |
8974 |
< |
^ |
8974 |
> |
^ |
8975 |
> |
|
8976 |
|
CREATE TRIGGER "BEFORE DROP PACKAGE" |
8977 |
|
ACTIVE BEFORE Drop PACKAGE POSITION 0 |
8978 |
|
AS BEGIN END |
8979 |
< |
^ |
8979 |
> |
^ |
8980 |
> |
|
8981 |
|
CREATE TRIGGER "AFTER DROP PACKAGE" |
8982 |
|
ACTIVE AFTER Drop PACKAGE POSITION 0 |
8983 |
|
AS BEGIN END |
8984 |
< |
^ |
8984 |
> |
^ |
8985 |
> |
|
8986 |
|
CREATE TRIGGER "BEFORE CREATE PACKAGE BODY" |
8987 |
|
ACTIVE BEFORE CREATE PACKAGE BODY POSITION 0 |
8988 |
|
AS BEGIN END |
8989 |
< |
^ |
8989 |
> |
^ |
8990 |
> |
|
8991 |
|
CREATE TRIGGER "AFTER CREATE PACKAGE BODY" |
8992 |
|
ACTIVE AFTER CREATE PACKAGE BODY POSITION 0 |
8993 |
|
AS BEGIN END |
8994 |
< |
^ |
8994 |
> |
^ |
8995 |
> |
|
8996 |
|
CREATE TRIGGER "BEFORE DROP PACKAGE BODY" |
8997 |
|
ACTIVE BEFORE Drop PACKAGE BODY POSITION 0 |
8998 |
|
AS BEGIN END |
8999 |
< |
^ |
8999 |
> |
^ |
9000 |
> |
|
9001 |
|
CREATE TRIGGER "AFTER DROP PACKAGE BODY" |
9002 |
|
ACTIVE AFTER Drop PACKAGE BODY POSITION 0 |
9003 |
|
AS BEGIN END |
9004 |
< |
^ |
9004 |
> |
^ |
9005 |
> |
|
9006 |
|
CREATE TRIGGER "BEFORE ANY DDL STATEMENT" |
9007 |
|
ACTIVE BEFORE ANY DDL STATEMENT POSITION 0 |
9008 |
|
AS BEGIN END |
9009 |
< |
^ |
9009 |
> |
^ |
9010 |
> |
|
9011 |
|
CREATE TRIGGER "AFTER ANY DDL STATEMENT" |
9012 |
|
ACTIVE AFTER ANY DDL STATEMENT POSITION 0 |
9013 |
|
AS BEGIN END |
9014 |
< |
^ |
9014 |
> |
^ |
9015 |
> |
|
9016 |
|
CREATE TRIGGER SET_CUST_NO FOR CUSTOMER |
9017 |
|
ACTIVE BEFORE INSERT POSITION 0 |
9018 |
|
AS |
9020 |
|
if (new.cust_no is null) then |
9021 |
|
new.cust_no = gen_id(cust_no_gen, 1); |
9022 |
|
END |
9023 |
< |
^ |
9023 |
> |
^ |
9024 |
> |
|
9025 |
|
CREATE TRIGGER SET_EMP_NO FOR EMPLOYEE |
9026 |
|
ACTIVE BEFORE INSERT POSITION 0 |
9027 |
|
AS |
9029 |
|
if (new.emp_no is null) then |
9030 |
|
new.emp_no = gen_id(emp_no_gen, 1); |
9031 |
|
END |
9032 |
< |
^ |
9032 |
> |
^ |
9033 |
> |
|
9034 |
|
CREATE TRIGGER SAVE_SALARY_CHANGE FOR EMPLOYEE |
9035 |
|
ACTIVE AFTER UPDATE POSITION 0 |
9036 |
|
AS |
9045 |
|
old.salary, |
9046 |
|
(new.salary - old.salary) * 100 / old.salary); |
9047 |
|
END |
9048 |
< |
^ |
9048 |
> |
^ |
9049 |
> |
|
9050 |
|
CREATE TRIGGER POST_NEW_ORDER FOR SALES |
9051 |
|
ACTIVE AFTER INSERT POSITION 0 |
9052 |
|
AS |
9053 |
|
BEGIN |
9054 |
|
POST_EVENT 'new_order'; |
9055 |
|
END |
9056 |
< |
^ |
9057 |
< |
COMMIT WORK ^ |
9056 |
> |
^ |
9057 |
> |
|
9058 |
> |
COMMIT WORK^ |
9059 |
|
SET TERM ;^ |
9060 |
|
COMMIT WORK; |
9061 |
|
SET AUTODDL OFF; |
9062 |
< |
SET TERM ^ ; |
9062 |
> |
SET TERM ^; |
9063 |
|
|
9064 |
|
/* Package Definitions */ |
9065 |
|
|
9066 |
< |
CREATE PACKAGE BODY FB$OUT |
9066 |
> |
CREATE PACKAGE BODY FB$OUT |
9067 |
|
AS |
8831 |
– |
|
9068 |
|
begin |
9069 |
|
procedure enable |
9070 |
|
as |
9119 |
|
execute procedure clear; |
9120 |
|
end |
9121 |
|
end |
9122 |
< |
^ |
9122 |
> |
^ |
9123 |
|
|
9124 |
< |
CREATE PACKAGE BODY SELECT$TEST |
9124 |
> |
CREATE PACKAGE BODY SELECT$TEST |
9125 |
|
AS |
8890 |
– |
|
9126 |
|
Begin |
9127 |
|
Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer) |
9128 |
|
As |
9130 |
|
SUSPEND; |
9131 |
|
End |
9132 |
|
End |
9133 |
< |
^ |
9133 |
> |
^ |
9134 |
|
|
9135 |
< |
SET TERM ; ^ |
9135 |
> |
SET TERM ;^ |
9136 |
|
COMMIT WORK; |
9137 |
|
SET AUTODDL ON; |
9138 |
|
COMMIT WORK; |
9139 |
|
SET AUTODDL OFF; |
9140 |
< |
SET TERM ^ ; |
9140 |
> |
SET TERM ^; |
9141 |
|
|
9142 |
|
/* Stored procedure Bodies */ |
9143 |
|
|
9144 |
< |
|
8910 |
< |
ALTER PROCEDURE SHOW_LANGS |
9144 |
> |
ALTER PROCEDURE SHOW_LANGS |
9145 |
|
( |
9146 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
9147 |
|
GRADE SMALLINT, |
9162 |
|
AND (language_req IS NOT NULL)) |
9163 |
|
INTO :languages; |
9164 |
|
IF (languages = ' ') THEN /* Prints 'NULL' instead of blanks */ |
9165 |
< |
languages = 'NULL'; |
9165 |
> |
languages = 'NULL'; |
9166 |
|
i = i +1; |
9167 |
|
SUSPEND; |
9168 |
|
END |
9169 |
|
END |
9170 |
< |
^ |
8937 |
< |
|
9170 |
> |
^ |
9171 |
|
|
9172 |
< |
ALTER PROCEDURE ADD_EMP_PROJ |
9172 |
> |
ALTER PROCEDURE ADD_EMP_PROJ |
9173 |
|
( |
9174 |
|
EMP_NO SMALLINT, |
9175 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
9182 |
|
EXCEPTION unknown_emp_id; |
9183 |
|
END |
9184 |
|
END |
9185 |
< |
^ |
8953 |
< |
|
9185 |
> |
^ |
9186 |
|
|
9187 |
< |
ALTER PROCEDURE ALL_LANGS |
9187 |
> |
ALTER PROCEDURE ALL_LANGS |
9188 |
|
RETURNS |
9189 |
|
( |
9190 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
9194 |
|
) |
9195 |
|
AS |
9196 |
|
BEGIN |
9197 |
< |
FOR SELECT job_code, job_grade, job_country FROM job |
9197 |
> |
FOR SELECT job_code, job_grade, job_country FROM job |
9198 |
|
INTO :code, :grade, :country |
9199 |
|
|
9200 |
|
DO |
9201 |
|
BEGIN |
9202 |
< |
FOR SELECT languages FROM show_langs |
9202 |
> |
FOR SELECT languages FROM show_langs |
9203 |
|
(:code, :grade, :country) INTO :lang DO |
9204 |
|
SUSPEND; |
9205 |
|
/* Put nice separators between rows */ |
9210 |
|
SUSPEND; |
9211 |
|
END |
9212 |
|
END |
9213 |
< |
^ |
8982 |
< |
|
9213 |
> |
^ |
9214 |
|
|
9215 |
< |
ALTER PROCEDURE DELETE_EMPLOYEE |
9215 |
> |
ALTER PROCEDURE DELETE_EMPLOYEE |
9216 |
|
( |
9217 |
|
EMP_NUM INTEGER |
9218 |
|
) |
9223 |
|
|
9224 |
|
/* |
9225 |
|
* If there are any sales records referencing this employee, |
9226 |
< |
* can't delete the employee until the sales are re-assigned |
9226 |
> |
* cannot delete the employee until the sales are re-assigned |
9227 |
|
* to another employee or changed to NULL. |
9228 |
|
*/ |
9229 |
|
SELECT count(po_number) |
9269 |
|
WHERE emp_no = :emp_num; |
9270 |
|
|
9271 |
|
END |
9272 |
< |
^ |
9042 |
< |
|
9272 |
> |
^ |
9273 |
|
|
9274 |
< |
ALTER PROCEDURE DEPT_BUDGET |
9274 |
> |
ALTER PROCEDURE DEPT_BUDGET |
9275 |
|
( |
9276 |
|
DNO CHAR(3) CHARACTER SET NONE |
9277 |
|
) |
9278 |
|
RETURNS |
9279 |
|
( |
9280 |
< |
TOT DECIMAL(12, 2) |
9280 |
> |
TOT DECIMAL(12,2) |
9281 |
|
) |
9282 |
|
AS |
9283 |
< |
DECLARE VARIABLE sumb DECIMAL(12, 2); |
9283 |
> |
DECLARE VARIABLE sumb DECIMAL(12,2); |
9284 |
|
DECLARE VARIABLE rdno CHAR(3); |
9285 |
|
DECLARE VARIABLE cnt INTEGER; |
9286 |
|
BEGIN |
9305 |
|
|
9306 |
|
SUSPEND; |
9307 |
|
END |
9308 |
< |
^ |
9308 |
> |
^ |
9309 |
|
|
9310 |
+ |
ALTER PROCEDURE EMPLOYEE_PAY_STATUS |
9311 |
+ |
( |
9312 |
+ |
EMP_NUM SMALLINT |
9313 |
+ |
) |
9314 |
+ |
RETURNS |
9315 |
+ |
( |
9316 |
+ |
PAY_STATUS VARCHAR(6) CHARACTER SET NONE, |
9317 |
+ |
SALARY NUMERIC(10,2) |
9318 |
+ |
) |
9319 |
+ |
AS |
9320 |
+ |
Declare aCursor CURSOR FOR ( |
9321 |
+ |
Select EMP_NO,SALARY From EMPLOYEE WHERE LAST_NAME = 'unknown'); |
9322 |
+ |
BEGIN |
9323 |
+ |
Select SALARY, Case |
9324 |
+ |
When SALARY > 10000 and SALARY <= 100000 then 'higher' |
9325 |
+ |
When SALARY > 100000 then 'gross' |
9326 |
+ |
else 'lower' End |
9327 |
+ |
From employee |
9328 |
+ |
WHERE emp_no = :EMP_NUM |
9329 |
+ |
into :SALARY, :PAY_STATUS; |
9330 |
+ |
END |
9331 |
+ |
^ |
9332 |
|
|
9333 |
< |
ALTER PROCEDURE GET_EMP_PROJ |
9333 |
> |
ALTER PROCEDURE GET_EMP_PROJ |
9334 |
|
( |
9335 |
|
EMP_NO SMALLINT |
9336 |
|
) |
9347 |
|
DO |
9348 |
|
SUSPEND; |
9349 |
|
END |
9350 |
< |
^ |
9099 |
< |
|
9350 |
> |
^ |
9351 |
|
|
9352 |
< |
ALTER PROCEDURE "Has Space" |
9352 |
> |
ALTER PROCEDURE "Has Space" |
9353 |
|
( |
9354 |
|
ARG1 INTEGER |
9355 |
|
) |
9356 |
|
AS |
9357 |
|
Begin End |
9358 |
< |
^ |
9108 |
< |
|
9358 |
> |
^ |
9359 |
|
|
9360 |
< |
ALTER PROCEDURE MAIL_LABEL |
9360 |
> |
ALTER PROCEDURE MAIL_LABEL |
9361 |
|
( |
9362 |
|
CUST_NO INTEGER |
9363 |
|
) |
9425 |
|
|
9426 |
|
SUSPEND; |
9427 |
|
END |
9428 |
< |
^ |
9179 |
< |
|
9428 |
> |
^ |
9429 |
|
|
9430 |
< |
ALTER PROCEDURE ORG_CHART |
9430 |
> |
ALTER PROCEDURE ORG_CHART |
9431 |
|
RETURNS |
9432 |
|
( |
9433 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
9467 |
|
SUSPEND; |
9468 |
|
END |
9469 |
|
END |
9470 |
< |
^ |
9222 |
< |
|
9470 |
> |
^ |
9471 |
|
|
9472 |
< |
ALTER PROCEDURE SHIP_ORDER |
9472 |
> |
ALTER PROCEDURE SHIP_ORDER |
9473 |
|
( |
9474 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
9475 |
|
) |
9526 |
|
WHERE po_number = :po_num; |
9527 |
|
|
9528 |
|
END |
9529 |
< |
^ |
9282 |
< |
|
9529 |
> |
^ |
9530 |
|
|
9531 |
< |
ALTER PROCEDURE SUB_TOT_BUDGET |
9531 |
> |
ALTER PROCEDURE SUB_TOT_BUDGET |
9532 |
|
( |
9533 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
9534 |
|
) |
9535 |
|
RETURNS |
9536 |
|
( |
9537 |
< |
TOT_BUDGET DECIMAL(12, 2), |
9538 |
< |
AVG_BUDGET DECIMAL(12, 2), |
9539 |
< |
MIN_BUDGET DECIMAL(12, 2), |
9540 |
< |
MAX_BUDGET DECIMAL(12, 2) |
9537 |
> |
TOT_BUDGET DECIMAL(12,2), |
9538 |
> |
AVG_BUDGET DECIMAL(12,2), |
9539 |
> |
MIN_BUDGET DECIMAL(12,2), |
9540 |
> |
MAX_BUDGET DECIMAL(12,2) |
9541 |
|
) |
9542 |
|
AS |
9543 |
|
BEGIN |
9547 |
|
INTO :tot_budget, :avg_budget, :min_budget, :max_budget; |
9548 |
|
SUSPEND; |
9549 |
|
END |
9550 |
< |
^ |
9304 |
< |
|
9550 |
> |
^ |
9551 |
|
|
9552 |
< |
ALTER PROCEDURE "UC SPACE" |
9552 |
> |
ALTER PROCEDURE "UC SPACE" |
9553 |
|
( |
9554 |
|
ARG1 INTEGER |
9555 |
|
) |
9556 |
|
AS |
9557 |
|
Begin End |
9558 |
< |
^ |
9313 |
< |
|
9558 |
> |
^ |
9559 |
|
|
9560 |
< |
ALTER PROCEDURE "iCASE" |
9560 |
> |
ALTER PROCEDURE "iCASE" |
9561 |
|
AS |
9562 |
|
Begin End |
9563 |
< |
^ |
9563 |
> |
^ |
9564 |
|
|
9565 |
< |
SET TERM ; ^ |
9565 |
> |
SET TERM ;^ |
9566 |
|
COMMIT WORK; |
9567 |
|
SET AUTODDL ON; |
9568 |
|
COMMIT WORK; |
9569 |
|
SET AUTODDL OFF; |
9570 |
< |
SET TERM ^ ; |
9570 |
> |
SET TERM ^; |
9571 |
|
|
9572 |
|
/* Stored Function Body */ |
9573 |
|
|
9574 |
|
ALTER FUNCTION F (X INTEGER) |
9575 |
|
RETURNS INTEGER |
9576 |
< |
AS |
9576 |
> |
AS |
9577 |
|
BEGIN |
9578 |
|
RETURN X+1; |
9579 |
|
END |
9580 |
|
^ |
9581 |
|
|
9582 |
< |
|
9338 |
< |
SET TERM ; ^ |
9582 |
> |
SET TERM ;^ |
9583 |
|
COMMIT WORK; |
9584 |
|
SET AUTODDL ON; |
9585 |
|
|
9653 |
|
/* Domain definitions */ |
9654 |
|
|
9655 |
|
CREATE DOMAIN ADDRESSLINE AS VARCHAR(30); |
9656 |
< |
CREATE DOMAIN BUDGET AS DECIMAL(12, 2) |
9656 |
> |
CREATE DOMAIN BUDGET AS DECIMAL(12,2) |
9657 |
|
DEFAULT 50000; |
9658 |
|
CREATE DOMAIN COUNTRYNAME AS VARCHAR(15); |
9659 |
|
CREATE DOMAIN CUSTNO AS INTEGER; |
9669 |
|
CREATE DOMAIN PRODTYPE AS VARCHAR(12) |
9670 |
|
DEFAULT 'software' NOT NULL; |
9671 |
|
CREATE DOMAIN PROJNO AS CHAR(5); |
9672 |
< |
CREATE DOMAIN SALARY AS NUMERIC(10, 2) |
9672 |
> |
CREATE DOMAIN SALARY AS NUMERIC(10,2) |
9673 |
|
DEFAULT 0; |
9674 |
|
|
9675 |
|
/* Table: COUNTRIES, Owner: SYSDBA */ |
9676 |
|
|
9677 |
< |
CREATE TABLE COUNTRIES |
9677 |
> |
CREATE TABLE COUNTRIES |
9678 |
|
( |
9679 |
|
COUNTRY VARCHAR(64) NOT NULL, |
9680 |
|
NONEU SMALLINT, |
9687 |
|
|
9688 |
|
/* Table: COUNTRY, Owner: SYSDBA */ |
9689 |
|
|
9690 |
< |
CREATE TABLE COUNTRY |
9690 |
> |
CREATE TABLE COUNTRY |
9691 |
|
( |
9692 |
|
COUNTRY COUNTRYNAME NOT NULL, |
9693 |
|
CURRENCY VARCHAR(10) NOT NULL, |
9696 |
|
|
9697 |
|
/* Table: CUSTOMER, Owner: SYSDBA */ |
9698 |
|
|
9699 |
< |
CREATE TABLE CUSTOMER |
9699 |
> |
CREATE TABLE CUSTOMER |
9700 |
|
( |
9701 |
|
CUST_NO CUSTNO NOT NULL, |
9702 |
|
CUSTOMER VARCHAR(25) NOT NULL, |
9716 |
|
|
9717 |
|
/* Table: DEPARTMENT, Owner: SYSDBA */ |
9718 |
|
|
9719 |
< |
CREATE TABLE DEPARTMENT |
9719 |
> |
CREATE TABLE DEPARTMENT |
9720 |
|
( |
9721 |
|
DEPT_NO DEPTNO NOT NULL, |
9722 |
|
DEPARTMENT VARCHAR(25) NOT NULL, |
9731 |
|
|
9732 |
|
/* Table: EMPLOYEE, Owner: SYSDBA */ |
9733 |
|
|
9734 |
< |
CREATE TABLE EMPLOYEE |
9734 |
> |
CREATE TABLE EMPLOYEE |
9735 |
|
( |
9736 |
|
EMP_NO EMPNO NOT NULL, |
9737 |
|
FIRST_NAME FIRSTNAME NOT NULL, |
9749 |
|
|
9750 |
|
/* Table: EMPLOYEE_PROJECT, Owner: SYSDBA */ |
9751 |
|
|
9752 |
< |
CREATE TABLE EMPLOYEE_PROJECT |
9752 |
> |
CREATE TABLE EMPLOYEE_PROJECT |
9753 |
|
( |
9754 |
|
EMP_NO EMPNO NOT NULL, |
9755 |
|
PROJ_ID PROJNO NOT NULL, |
9758 |
|
|
9759 |
|
/* Table: FB$OUT_TABLE, Owner: SYSDBA */ |
9760 |
|
|
9761 |
< |
CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE |
9761 |
> |
CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE |
9762 |
|
( |
9763 |
|
LINE_NUM INTEGER, |
9764 |
|
CONTENT FB$OUT_TYPE |
9766 |
|
|
9767 |
|
/* Table: ITEST, Owner: SYSDBA */ |
9768 |
|
|
9769 |
< |
CREATE TABLE ITEST |
9769 |
> |
CREATE TABLE ITEST |
9770 |
|
( |
9771 |
|
"KEY" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL, |
9772 |
|
SOMETEXT VARCHAR(64), |
9775 |
|
|
9776 |
|
/* Table: ITEST2, Owner: SYSDBA */ |
9777 |
|
|
9778 |
< |
CREATE TABLE ITEST2 |
9778 |
> |
CREATE TABLE ITEST2 |
9779 |
|
( |
9780 |
|
"KEY" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL, |
9781 |
|
SOMETEXT VARCHAR(64), |
9784 |
|
|
9785 |
|
/* Table: JOB, Owner: SYSDBA */ |
9786 |
|
|
9787 |
< |
CREATE TABLE JOB |
9787 |
> |
CREATE TABLE JOB |
9788 |
|
( |
9789 |
|
JOB_CODE JOBCODE NOT NULL, |
9790 |
|
JOB_GRADE JOBGRADE NOT NULL, |
9799 |
|
|
9800 |
|
/* Table: PROJECT, Owner: SYSDBA */ |
9801 |
|
|
9802 |
< |
CREATE TABLE PROJECT |
9802 |
> |
CREATE TABLE PROJECT |
9803 |
|
( |
9804 |
|
PROJ_ID PROJNO NOT NULL, |
9805 |
|
PROJ_NAME VARCHAR(20) NOT NULL, |
9812 |
|
|
9813 |
|
/* Table: PROJ_DEPT_BUDGET, Owner: SYSDBA */ |
9814 |
|
|
9815 |
< |
CREATE TABLE PROJ_DEPT_BUDGET |
9815 |
> |
CREATE TABLE PROJ_DEPT_BUDGET |
9816 |
|
( |
9817 |
|
FISCAL_YEAR INTEGER NOT NULL, |
9818 |
|
PROJ_ID PROJNO NOT NULL, |
9824 |
|
|
9825 |
|
/* Table: SALARY_HISTORY, Owner: SYSDBA */ |
9826 |
|
|
9827 |
< |
CREATE TABLE SALARY_HISTORY |
9827 |
> |
CREATE TABLE SALARY_HISTORY |
9828 |
|
( |
9829 |
|
EMP_NO EMPNO NOT NULL, |
9830 |
|
CHANGE_DATE TIMESTAMP DEFAULT 'NOW' NOT NULL, |
9837 |
|
|
9838 |
|
/* Table: SALES, Owner: SYSDBA */ |
9839 |
|
|
9840 |
< |
CREATE TABLE SALES |
9840 |
> |
CREATE TABLE SALES |
9841 |
|
( |
9842 |
|
PO_NUMBER PONUMBER NOT NULL, |
9843 |
|
CUST_NO CUSTNO NOT NULL, |
9848 |
|
DATE_NEEDED TIMESTAMP, |
9849 |
|
PAID CHAR(1) DEFAULT 'n', |
9850 |
|
QTY_ORDERED INTEGER DEFAULT 1 NOT NULL, |
9851 |
< |
TOTAL_VALUE DECIMAL(9, 2) NOT NULL, |
9851 |
> |
TOTAL_VALUE DECIMAL(9,2) NOT NULL, |
9852 |
|
DISCOUNT FLOAT DEFAULT 0 NOT NULL, |
9853 |
|
ITEM_TYPE PRODTYPE, |
9854 |
|
AGED COMPUTED BY (ship_date - order_date), |
9861 |
|
TIMESTAMP, INTEGER |
9862 |
|
RETURNS TIMESTAMP |
9863 |
|
ENTRY_POINT 'addDay' MODULE_NAME 'fbudf' |
9620 |
– |
|
9864 |
|
; |
9865 |
|
|
9866 |
|
|
9867 |
|
DECLARE EXTERNAL FUNCTION I64TRUNCATE |
9868 |
< |
NUMERIC(18, 0) BY DESCRIPTOR, NUMERIC(18, 0) BY DESCRIPTOR |
9868 |
> |
NUMERIC(18,0) BY DESCRIPTOR, NUMERIC(18,0) BY DESCRIPTOR |
9869 |
|
RETURNS PARAMETER 2 |
9870 |
|
ENTRY_POINT 'fbtruncate' MODULE_NAME 'fbudf' |
9628 |
– |
|
9871 |
|
; |
9872 |
|
|
9873 |
|
|
9875 |
|
TIMESTAMP, INTEGER NULL, CSTRING(10) CHARACTER SET NONE, CSTRING(10) CHARACTER SET NONE BY DESCRIPTOR |
9876 |
|
RETURNS CSTRING(32) CHARACTER SET NONE FREE_IT |
9877 |
|
ENTRY_POINT 'testit' MODULE_NAME 'fbudf' |
9636 |
– |
|
9878 |
|
; |
9879 |
|
|
9880 |
|
|
10607 |
|
ALTER TABLE SALES ADD FOREIGN KEY (SALES_REP) REFERENCES EMPLOYEE (EMP_NO); |
10608 |
|
|
10609 |
|
CREATE SEQUENCE CUST_NO_GEN; |
10610 |
< |
ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1015; |
10610 |
> |
ALTER SEQUENCE CUST_NO_GEN RESTART WITH 1016; |
10611 |
|
CREATE SEQUENCE EMP_NO_GEN; |
10612 |
< |
ALTER SEQUENCE EMP_NO_GEN RESTART WITH 157; |
10612 |
> |
ALTER SEQUENCE EMP_NO_GEN RESTART WITH 158; |
10613 |
|
CREATE SEQUENCE FB$OUT_SEQ; |
10614 |
< |
ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 0; |
10614 |
> |
ALTER SEQUENCE FB$OUT_SEQ RESTART WITH 1; |
10615 |
|
|
10616 |
|
/* View: DEPTLIST, Owner: SYSDBA */ |
10617 |
|
|
10618 |
|
CREATE VIEW DEPTLIST ( |
10619 |
< |
EMP_NO, |
10620 |
< |
FIRST_NAME, |
10621 |
< |
LAST_NAME, |
10622 |
< |
PHONE_EXT, |
10623 |
< |
HIRE_DATE, |
10624 |
< |
DEPT_NO, |
10625 |
< |
JOB_CODE, |
10626 |
< |
JOB_GRADE, |
10627 |
< |
JOB_COUNTRY, |
10628 |
< |
SALARY, |
10629 |
< |
FULL_NAME, |
10630 |
< |
DEPT_PATH, |
10631 |
< |
DEPT_KEY_PATH |
10619 |
> |
EMP_NO, |
10620 |
> |
FIRST_NAME, |
10621 |
> |
LAST_NAME, |
10622 |
> |
PHONE_EXT, |
10623 |
> |
HIRE_DATE, |
10624 |
> |
DEPT_NO, |
10625 |
> |
JOB_CODE, |
10626 |
> |
JOB_GRADE, |
10627 |
> |
JOB_COUNTRY, |
10628 |
> |
SALARY, |
10629 |
> |
FULL_NAME, |
10630 |
> |
DEPT_PATH, |
10631 |
> |
DEPT_KEY_PATH, |
10632 |
> |
"Payment Status" |
10633 |
|
) AS |
10634 |
|
with recursive Depts As ( |
10635 |
|
Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar(256)) as DEPT_PATH, |
10643 |
|
) |
10644 |
|
|
10645 |
|
Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, |
10646 |
< |
A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH |
10646 |
> |
A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH, |
10647 |
> |
CASE When A.SALARY > 10000 then 'higher paid' else 'lower paid' End |
10648 |
|
From EMPLOYEE A |
10649 |
|
JOIN Depts D On D.DEPT_NO = A.DEPT_NO |
10650 |
|
; |
10652 |
|
/* View: PHONE_LIST, Owner: SYSDBA */ |
10653 |
|
|
10654 |
|
CREATE VIEW PHONE_LIST ( |
10655 |
< |
EMP_NO, |
10656 |
< |
FIRST_NAME, |
10657 |
< |
LAST_NAME, |
10658 |
< |
PHONE_EXT, |
10659 |
< |
LOCATION, |
10655 |
> |
EMP_NO, |
10656 |
> |
FIRST_NAME, |
10657 |
> |
LAST_NAME, |
10658 |
> |
PHONE_EXT, |
10659 |
> |
LOCATION, |
10660 |
|
PHONE_NO |
10661 |
|
) AS |
10662 |
|
SELECT |
10758 |
|
CREATE EXCEPTION UNKNOWN_EMP_ID 'Invalid employee number or project id.'; |
10759 |
|
COMMIT WORK; |
10760 |
|
SET AUTODDL OFF; |
10761 |
< |
SET TERM ^ ; |
10761 |
> |
SET TERM ^; |
10762 |
|
|
10763 |
|
/* Package Definitions */ |
10764 |
|
|
10765 |
< |
CREATE PACKAGE FB$OUT |
10765 |
> |
CREATE PACKAGE FB$OUT |
10766 |
|
AS |
10524 |
– |
|
10767 |
|
begin |
10768 |
|
procedure enable; |
10769 |
|
procedure disable; |
10773 |
|
|
10774 |
|
procedure get_lines returns (lines fb$out_type); |
10775 |
|
end |
10776 |
< |
^ |
10776 |
> |
^ |
10777 |
|
|
10778 |
< |
CREATE PACKAGE SELECT$TEST |
10778 |
> |
CREATE PACKAGE SELECT$TEST |
10779 |
|
AS |
10538 |
– |
|
10780 |
|
Begin |
10781 |
|
Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer); |
10782 |
|
End |
10783 |
< |
^ |
10783 |
> |
^ |
10784 |
|
|
10785 |
< |
SET TERM ; ^ |
10785 |
> |
SET TERM ;^ |
10786 |
|
COMMIT WORK; |
10787 |
|
SET AUTODDL ON; |
10788 |
|
COMMIT WORK; |
10789 |
|
SET AUTODDL OFF; |
10790 |
< |
SET TERM ^ ; |
10790 |
> |
SET TERM ^; |
10791 |
|
|
10792 |
|
/* Stored procedures Definitions*/ |
10793 |
|
|
10794 |
< |
CREATE PROCEDURE SHOW_LANGS |
10794 |
> |
CREATE PROCEDURE SHOW_LANGS |
10795 |
|
( |
10796 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
10797 |
|
GRADE SMALLINT, |
10803 |
|
) |
10804 |
|
AS |
10805 |
|
BEGIN SUSPEND; EXIT; END |
10565 |
– |
|
10806 |
|
^ |
10807 |
|
|
10808 |
< |
CREATE PROCEDURE ADD_EMP_PROJ |
10808 |
> |
CREATE PROCEDURE ADD_EMP_PROJ |
10809 |
|
( |
10810 |
|
EMP_NO SMALLINT, |
10811 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
10812 |
|
) |
10813 |
|
AS |
10814 |
|
BEGIN EXIT; END |
10575 |
– |
|
10815 |
|
^ |
10816 |
|
|
10817 |
< |
CREATE PROCEDURE ALL_LANGS |
10817 |
> |
CREATE PROCEDURE ALL_LANGS |
10818 |
|
RETURNS |
10819 |
|
( |
10820 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
10824 |
|
) |
10825 |
|
AS |
10826 |
|
BEGIN SUSPEND; EXIT; END |
10588 |
– |
|
10827 |
|
^ |
10828 |
|
|
10829 |
< |
CREATE PROCEDURE DELETE_EMPLOYEE |
10829 |
> |
CREATE PROCEDURE DELETE_EMPLOYEE |
10830 |
|
( |
10831 |
|
EMP_NUM INTEGER |
10832 |
|
) |
10833 |
|
AS |
10834 |
|
BEGIN EXIT; END |
10597 |
– |
|
10835 |
|
^ |
10836 |
|
|
10837 |
< |
CREATE PROCEDURE DEPT_BUDGET |
10837 |
> |
CREATE PROCEDURE DEPT_BUDGET |
10838 |
|
( |
10839 |
|
DNO CHAR(3) CHARACTER SET NONE |
10840 |
|
) |
10841 |
|
RETURNS |
10842 |
|
( |
10843 |
< |
TOT DECIMAL(12, 2) |
10843 |
> |
TOT DECIMAL(12,2) |
10844 |
|
) |
10845 |
|
AS |
10846 |
|
BEGIN SUSPEND; EXIT; END |
10847 |
+ |
^ |
10848 |
|
|
10849 |
+ |
CREATE PROCEDURE EMPLOYEE_PAY_STATUS |
10850 |
+ |
( |
10851 |
+ |
EMP_NUM SMALLINT |
10852 |
+ |
) |
10853 |
+ |
RETURNS |
10854 |
+ |
( |
10855 |
+ |
PAY_STATUS VARCHAR(6) CHARACTER SET NONE, |
10856 |
+ |
SALARY NUMERIC(10,2) |
10857 |
+ |
) |
10858 |
+ |
AS |
10859 |
+ |
BEGIN EXIT; END |
10860 |
|
^ |
10861 |
|
|
10862 |
< |
CREATE PROCEDURE GET_EMP_PROJ |
10862 |
> |
CREATE PROCEDURE GET_EMP_PROJ |
10863 |
|
( |
10864 |
|
EMP_NO SMALLINT |
10865 |
|
) |
10869 |
|
) |
10870 |
|
AS |
10871 |
|
BEGIN SUSPEND; EXIT; END |
10623 |
– |
|
10872 |
|
^ |
10873 |
|
|
10874 |
< |
CREATE PROCEDURE "Has Space" |
10874 |
> |
CREATE PROCEDURE "Has Space" |
10875 |
|
( |
10876 |
|
ARG1 INTEGER |
10877 |
|
) |
10878 |
|
AS |
10879 |
|
BEGIN EXIT; END |
10632 |
– |
|
10880 |
|
^ |
10881 |
|
|
10882 |
< |
CREATE PROCEDURE MAIL_LABEL |
10882 |
> |
CREATE PROCEDURE MAIL_LABEL |
10883 |
|
( |
10884 |
|
CUST_NO INTEGER |
10885 |
|
) |
10894 |
|
) |
10895 |
|
AS |
10896 |
|
BEGIN SUSPEND; EXIT; END |
10650 |
– |
|
10897 |
|
^ |
10898 |
|
|
10899 |
< |
CREATE PROCEDURE ORG_CHART |
10899 |
> |
CREATE PROCEDURE ORG_CHART |
10900 |
|
RETURNS |
10901 |
|
( |
10902 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
10907 |
|
) |
10908 |
|
AS |
10909 |
|
BEGIN SUSPEND; EXIT; END |
10664 |
– |
|
10910 |
|
^ |
10911 |
|
|
10912 |
< |
CREATE PROCEDURE SHIP_ORDER |
10912 |
> |
CREATE PROCEDURE SHIP_ORDER |
10913 |
|
( |
10914 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
10915 |
|
) |
10916 |
|
AS |
10917 |
|
BEGIN EXIT; END |
10673 |
– |
|
10918 |
|
^ |
10919 |
|
|
10920 |
< |
CREATE PROCEDURE SUB_TOT_BUDGET |
10920 |
> |
CREATE PROCEDURE SUB_TOT_BUDGET |
10921 |
|
( |
10922 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
10923 |
|
) |
10924 |
|
RETURNS |
10925 |
|
( |
10926 |
< |
TOT_BUDGET DECIMAL(12, 2), |
10927 |
< |
AVG_BUDGET DECIMAL(12, 2), |
10928 |
< |
MIN_BUDGET DECIMAL(12, 2), |
10929 |
< |
MAX_BUDGET DECIMAL(12, 2) |
10926 |
> |
TOT_BUDGET DECIMAL(12,2), |
10927 |
> |
AVG_BUDGET DECIMAL(12,2), |
10928 |
> |
MIN_BUDGET DECIMAL(12,2), |
10929 |
> |
MAX_BUDGET DECIMAL(12,2) |
10930 |
|
) |
10931 |
|
AS |
10932 |
|
BEGIN SUSPEND; EXIT; END |
10689 |
– |
|
10933 |
|
^ |
10934 |
|
|
10935 |
< |
CREATE PROCEDURE "UC SPACE" |
10935 |
> |
CREATE PROCEDURE "UC SPACE" |
10936 |
|
( |
10937 |
|
ARG1 INTEGER |
10938 |
|
) |
10939 |
|
AS |
10940 |
|
BEGIN EXIT; END |
10698 |
– |
|
10941 |
|
^ |
10942 |
|
|
10943 |
< |
CREATE PROCEDURE "iCASE" |
10943 |
> |
CREATE PROCEDURE "iCASE" |
10944 |
|
AS |
10945 |
|
BEGIN EXIT; END |
10704 |
– |
|
10946 |
|
^ |
10947 |
|
|
10948 |
< |
SET TERM ; ^ |
10948 |
> |
SET TERM ;^ |
10949 |
|
COMMIT WORK; |
10950 |
|
SET AUTODDL ON; |
10951 |
|
COMMIT WORK; |
10952 |
|
SET AUTODDL OFF; |
10953 |
< |
SET TERM ^ ; |
10953 |
> |
SET TERM ^; |
10954 |
|
|
10955 |
|
/* Stored Function declarations */ |
10956 |
|
|
10957 |
|
CREATE FUNCTION F (X INTEGER) |
10958 |
|
RETURNS INTEGER |
10959 |
|
AS BEGIN END |
10719 |
– |
|
10960 |
|
^ |
10961 |
|
|
10962 |
< |
|
10723 |
< |
SET TERM ; ^ |
10962 |
> |
SET TERM ;^ |
10963 |
|
COMMIT WORK; |
10964 |
|
SET AUTODDL ON; |
10965 |
< |
SET TERM ^ ; |
10965 |
> |
SET TERM ^; |
10966 |
|
|
10967 |
|
|
10968 |
|
/* Triggers only will work for SQL triggers */ |
10972 |
|
as |
10973 |
|
begin |
10974 |
|
End |
10975 |
< |
^ |
10975 |
> |
^ |
10976 |
> |
|
10977 |
|
CREATE TRIGGER "BEFORE CREATE TABLE" |
10978 |
|
ACTIVE BEFORE CREATE TABLE POSITION 0 |
10979 |
|
AS BEGIN END |
10980 |
< |
^ |
10980 |
> |
^ |
10981 |
> |
|
10982 |
|
CREATE TRIGGER "AFTER CREATE TABLE" |
10983 |
|
ACTIVE AFTER CREATE TABLE POSITION 0 |
10984 |
|
AS BEGIN END |
10985 |
< |
^ |
10985 |
> |
^ |
10986 |
> |
|
10987 |
|
CREATE TRIGGER "BEFORE ALTER TABLE" |
10988 |
|
ACTIVE BEFORE ALTER TABLE POSITION 0 |
10989 |
|
AS BEGIN END |
10990 |
< |
^ |
10990 |
> |
^ |
10991 |
> |
|
10992 |
|
CREATE TRIGGER "AFTER ALTER TABLE" |
10993 |
|
ACTIVE AFTER ALTER TABLE POSITION 0 |
10994 |
|
AS BEGIN END |
10995 |
< |
^ |
10995 |
> |
^ |
10996 |
> |
|
10997 |
|
CREATE TRIGGER "AFTER CREATE/Alter TABLE" |
10998 |
|
ACTIVE AFTER CREATE TABLE OR ALTER TABLE POSITION 0 |
10999 |
|
AS BEGIN END |
11000 |
< |
^ |
11000 |
> |
^ |
11001 |
> |
|
11002 |
|
CREATE TRIGGER "BEFORE DROP TABLE" |
11003 |
|
ACTIVE BEFORE Drop TABLE POSITION 0 |
11004 |
|
AS BEGIN END |
11005 |
< |
^ |
11005 |
> |
^ |
11006 |
> |
|
11007 |
|
CREATE TRIGGER "AFTER DROP TABLE" |
11008 |
|
ACTIVE AFTER Drop TABLE POSITION 0 |
11009 |
|
AS BEGIN END |
11010 |
< |
^ |
11010 |
> |
^ |
11011 |
> |
|
11012 |
|
CREATE TRIGGER "BEFORE CREATE PROCEDURE" |
11013 |
|
ACTIVE BEFORE CREATE PROCEDURE POSITION 0 |
11014 |
|
AS BEGIN END |
11015 |
< |
^ |
11015 |
> |
^ |
11016 |
> |
|
11017 |
|
CREATE TRIGGER "AFTER CREATE PROCEDURE" |
11018 |
|
ACTIVE AFTER CREATE PROCEDURE POSITION 0 |
11019 |
|
AS BEGIN END |
11020 |
< |
^ |
11020 |
> |
^ |
11021 |
> |
|
11022 |
|
CREATE TRIGGER "BEFORE ALTER PROCEDURE" |
11023 |
|
ACTIVE BEFORE ALTER PROCEDURE POSITION 0 |
11024 |
|
AS BEGIN END |
11025 |
< |
^ |
11025 |
> |
^ |
11026 |
> |
|
11027 |
|
CREATE TRIGGER "AFTER ALTER PROCEDURE" |
11028 |
|
ACTIVE AFTER ALTER PROCEDURE POSITION 0 |
11029 |
|
AS BEGIN END |
11030 |
< |
^ |
11030 |
> |
^ |
11031 |
> |
|
11032 |
|
CREATE TRIGGER "BEFORE DROP PROCEDURE" |
11033 |
|
ACTIVE BEFORE Drop PROCEDURE POSITION 0 |
11034 |
|
AS BEGIN END |
11035 |
< |
^ |
11035 |
> |
^ |
11036 |
> |
|
11037 |
|
CREATE TRIGGER "AFTER DROP PROCEDURE" |
11038 |
|
ACTIVE AFTER Drop PROCEDURE POSITION 0 |
11039 |
|
AS BEGIN END |
11040 |
< |
^ |
11040 |
> |
^ |
11041 |
> |
|
11042 |
|
CREATE TRIGGER "BEFORE CREATE FUNCTION" |
11043 |
|
ACTIVE BEFORE CREATE FUNCTION POSITION 0 |
11044 |
|
AS BEGIN END |
11045 |
< |
^ |
11045 |
> |
^ |
11046 |
> |
|
11047 |
|
CREATE TRIGGER "AFTER CREATE FUNCTION" |
11048 |
|
ACTIVE AFTER CREATE FUNCTION POSITION 0 |
11049 |
|
AS BEGIN END |
11050 |
< |
^ |
11050 |
> |
^ |
11051 |
> |
|
11052 |
|
CREATE TRIGGER "BEFORE ALTER FUNCTION" |
11053 |
|
ACTIVE BEFORE ALTER FUNCTION POSITION 0 |
11054 |
|
AS BEGIN END |
11055 |
< |
^ |
11055 |
> |
^ |
11056 |
> |
|
11057 |
|
CREATE TRIGGER "AFTER ALTER FUNCTION" |
11058 |
|
ACTIVE AFTER ALTER FUNCTION POSITION 0 |
11059 |
|
AS BEGIN END |
11060 |
< |
^ |
11060 |
> |
^ |
11061 |
> |
|
11062 |
|
CREATE TRIGGER "BEFORE DROP FUNCTION" |
11063 |
|
ACTIVE BEFORE Drop FUNCTION POSITION 0 |
11064 |
|
AS BEGIN END |
11065 |
< |
^ |
11065 |
> |
^ |
11066 |
> |
|
11067 |
|
CREATE TRIGGER "AFTER DROP FUNCTION" |
11068 |
|
ACTIVE AFTER Drop FUNCTION POSITION 0 |
11069 |
|
AS BEGIN END |
11070 |
< |
^ |
11070 |
> |
^ |
11071 |
> |
|
11072 |
|
CREATE TRIGGER "BEFORE CREATE TRIGGER" |
11073 |
|
ACTIVE BEFORE CREATE TRIGGER POSITION 0 |
11074 |
|
AS BEGIN END |
11075 |
< |
^ |
11075 |
> |
^ |
11076 |
> |
|
11077 |
|
CREATE TRIGGER "AFTER CREATE TRIGGER" |
11078 |
|
ACTIVE AFTER CREATE TRIGGER POSITION 0 |
11079 |
|
AS BEGIN END |
11080 |
< |
^ |
11080 |
> |
^ |
11081 |
> |
|
11082 |
|
CREATE TRIGGER "BEFORE ALTER TRIGGER" |
11083 |
|
ACTIVE BEFORE ALTER TRIGGER POSITION 0 |
11084 |
|
AS BEGIN END |
11085 |
< |
^ |
11085 |
> |
^ |
11086 |
> |
|
11087 |
|
CREATE TRIGGER "AFTER ALTER TRIGGER" |
11088 |
|
ACTIVE AFTER ALTER TRIGGER POSITION 0 |
11089 |
|
AS BEGIN END |
11090 |
< |
^ |
11090 |
> |
^ |
11091 |
> |
|
11092 |
|
CREATE TRIGGER "BEFORE DROP TRIGGER" |
11093 |
|
ACTIVE BEFORE Drop TRIGGER POSITION 0 |
11094 |
|
AS BEGIN END |
11095 |
< |
^ |
11095 |
> |
^ |
11096 |
> |
|
11097 |
|
CREATE TRIGGER "AFTER DROP TRIGGER" |
11098 |
|
ACTIVE AFTER Drop TRIGGER POSITION 0 |
11099 |
|
AS BEGIN END |
11100 |
< |
^ |
11100 |
> |
^ |
11101 |
> |
|
11102 |
|
CREATE TRIGGER "BEFORE CREATE EXCEPTION" |
11103 |
|
ACTIVE BEFORE CREATE EXCEPTION POSITION 0 |
11104 |
|
AS BEGIN END |
11105 |
< |
^ |
11105 |
> |
^ |
11106 |
> |
|
11107 |
|
CREATE TRIGGER "AFTER CREATE EXCEPTION" |
11108 |
|
ACTIVE AFTER CREATE EXCEPTION POSITION 0 |
11109 |
|
AS BEGIN END |
11110 |
< |
^ |
11110 |
> |
^ |
11111 |
> |
|
11112 |
|
CREATE TRIGGER "BEFORE ALTER EXCEPTION" |
11113 |
|
ACTIVE BEFORE ALTER EXCEPTION POSITION 0 |
11114 |
|
AS BEGIN END |
11115 |
< |
^ |
11115 |
> |
^ |
11116 |
> |
|
11117 |
|
CREATE TRIGGER "AFTER ALTER EXCEPTION" |
11118 |
|
ACTIVE AFTER ALTER EXCEPTION POSITION 0 |
11119 |
|
AS BEGIN END |
11120 |
< |
^ |
11120 |
> |
^ |
11121 |
> |
|
11122 |
|
CREATE TRIGGER "BEFORE DROP EXCEPTION" |
11123 |
|
ACTIVE BEFORE Drop EXCEPTION POSITION 0 |
11124 |
|
AS BEGIN END |
11125 |
< |
^ |
11125 |
> |
^ |
11126 |
> |
|
11127 |
|
CREATE TRIGGER "AFTER DROP EXCEPTION" |
11128 |
|
ACTIVE AFTER Drop EXCEPTION POSITION 0 |
11129 |
|
AS BEGIN END |
11130 |
< |
^ |
11130 |
> |
^ |
11131 |
> |
|
11132 |
|
CREATE TRIGGER "BEFORE CREATE VIEW" |
11133 |
|
ACTIVE BEFORE CREATE VIEW POSITION 0 |
11134 |
|
AS BEGIN END |
11135 |
< |
^ |
11135 |
> |
^ |
11136 |
> |
|
11137 |
|
CREATE TRIGGER "AFTER CREATE VIEW" |
11138 |
|
ACTIVE AFTER CREATE VIEW POSITION 0 |
11139 |
|
AS BEGIN END |
11140 |
< |
^ |
11140 |
> |
^ |
11141 |
> |
|
11142 |
|
CREATE TRIGGER "BEFORE ALTER VIEW" |
11143 |
|
ACTIVE BEFORE ALTER VIEW POSITION 0 |
11144 |
|
AS BEGIN END |
11145 |
< |
^ |
11145 |
> |
^ |
11146 |
> |
|
11147 |
|
CREATE TRIGGER "AFTER ALTER VIEW" |
11148 |
|
ACTIVE AFTER ALTER VIEW POSITION 0 |
11149 |
|
AS BEGIN END |
11150 |
< |
^ |
11150 |
> |
^ |
11151 |
> |
|
11152 |
|
CREATE TRIGGER "BEFORE DROP VIEW" |
11153 |
|
ACTIVE BEFORE Drop VIEW POSITION 0 |
11154 |
|
AS BEGIN END |
11155 |
< |
^ |
11155 |
> |
^ |
11156 |
> |
|
11157 |
|
CREATE TRIGGER "AFTER DROP VIEW" |
11158 |
|
ACTIVE AFTER Drop VIEW POSITION 0 |
11159 |
|
AS BEGIN END |
11160 |
< |
^ |
11160 |
> |
^ |
11161 |
> |
|
11162 |
|
CREATE TRIGGER "BEFORE CREATE DOMAIN" |
11163 |
|
ACTIVE BEFORE CREATE DOMAIN POSITION 0 |
11164 |
|
AS BEGIN END |
11165 |
< |
^ |
11165 |
> |
^ |
11166 |
> |
|
11167 |
|
CREATE TRIGGER "AFTER CREATE DOMAIN" |
11168 |
|
ACTIVE AFTER CREATE DOMAIN POSITION 0 |
11169 |
|
AS BEGIN END |
11170 |
< |
^ |
11170 |
> |
^ |
11171 |
> |
|
11172 |
|
CREATE TRIGGER "BEFORE ALTER DOMAIN" |
11173 |
|
ACTIVE BEFORE ALTER DOMAIN POSITION 0 |
11174 |
|
AS BEGIN END |
11175 |
< |
^ |
11175 |
> |
^ |
11176 |
> |
|
11177 |
|
CREATE TRIGGER "AFTER ALTER DOMAIN" |
11178 |
|
ACTIVE AFTER ALTER DOMAIN POSITION 0 |
11179 |
|
AS BEGIN END |
11180 |
< |
^ |
11180 |
> |
^ |
11181 |
> |
|
11182 |
|
CREATE TRIGGER "BEFORE DROP DOMAIN" |
11183 |
|
ACTIVE BEFORE Drop DOMAIN POSITION 0 |
11184 |
|
AS BEGIN END |
11185 |
< |
^ |
11185 |
> |
^ |
11186 |
> |
|
11187 |
|
CREATE TRIGGER "AFTER DROP DOMAIN" |
11188 |
|
ACTIVE AFTER Drop DOMAIN POSITION 0 |
11189 |
|
AS BEGIN END |
11190 |
< |
^ |
11190 |
> |
^ |
11191 |
> |
|
11192 |
|
CREATE TRIGGER "BEFORE CREATE ROLE" |
11193 |
|
ACTIVE BEFORE CREATE ROLE POSITION 0 |
11194 |
|
AS BEGIN END |
11195 |
< |
^ |
11195 |
> |
^ |
11196 |
> |
|
11197 |
|
CREATE TRIGGER "AFTER CREATE ROLE" |
11198 |
|
ACTIVE AFTER CREATE ROLE POSITION 0 |
11199 |
|
AS BEGIN END |
11200 |
< |
^ |
11200 |
> |
^ |
11201 |
> |
|
11202 |
|
CREATE TRIGGER "BEFORE ALTER ROLE" |
11203 |
|
ACTIVE BEFORE ALTER ROLE POSITION 0 |
11204 |
|
AS BEGIN END |
11205 |
< |
^ |
11205 |
> |
^ |
11206 |
> |
|
11207 |
|
CREATE TRIGGER "AFTER ALTER ROLE" |
11208 |
|
ACTIVE AFTER ALTER ROLE POSITION 0 |
11209 |
|
AS BEGIN END |
11210 |
< |
^ |
11210 |
> |
^ |
11211 |
> |
|
11212 |
|
CREATE TRIGGER "BEFORE DROP ROLE" |
11213 |
|
ACTIVE BEFORE Drop ROLE POSITION 0 |
11214 |
|
AS BEGIN END |
11215 |
< |
^ |
11215 |
> |
^ |
11216 |
> |
|
11217 |
|
CREATE TRIGGER "AFTER DROP ROLE" |
11218 |
|
ACTIVE AFTER Drop ROLE POSITION 0 |
11219 |
|
AS BEGIN END |
11220 |
< |
^ |
11220 |
> |
^ |
11221 |
> |
|
11222 |
|
CREATE TRIGGER "BEFORE CREATE INDEX" |
11223 |
|
ACTIVE BEFORE CREATE INDEX POSITION 0 |
11224 |
|
AS BEGIN END |
11225 |
< |
^ |
11225 |
> |
^ |
11226 |
> |
|
11227 |
|
CREATE TRIGGER "AFTER CREATE INDEX" |
11228 |
|
ACTIVE AFTER CREATE INDEX POSITION 0 |
11229 |
|
AS BEGIN END |
11230 |
< |
^ |
11230 |
> |
^ |
11231 |
> |
|
11232 |
|
CREATE TRIGGER "BEFORE ALTER INDEX" |
11233 |
|
ACTIVE BEFORE ALTER INDEX POSITION 0 |
11234 |
|
AS BEGIN END |
11235 |
< |
^ |
11235 |
> |
^ |
11236 |
> |
|
11237 |
|
CREATE TRIGGER "AFTER ALTER INDEX" |
11238 |
|
ACTIVE AFTER ALTER INDEX POSITION 0 |
11239 |
|
AS BEGIN END |
11240 |
< |
^ |
11240 |
> |
^ |
11241 |
> |
|
11242 |
|
CREATE TRIGGER "BEFORE DROP INDEX" |
11243 |
|
ACTIVE BEFORE Drop INDEX POSITION 0 |
11244 |
|
AS BEGIN END |
11245 |
< |
^ |
11245 |
> |
^ |
11246 |
> |
|
11247 |
|
CREATE TRIGGER "AFTER DROP INDEX" |
11248 |
|
ACTIVE AFTER Drop INDEX POSITION 0 |
11249 |
|
AS BEGIN END |
11250 |
< |
^ |
11250 |
> |
^ |
11251 |
> |
|
11252 |
|
CREATE TRIGGER "BEFORE CREATE SEQUENCE" |
11253 |
|
ACTIVE BEFORE CREATE SEQUENCE POSITION 0 |
11254 |
|
AS BEGIN END |
11255 |
< |
^ |
11255 |
> |
^ |
11256 |
> |
|
11257 |
|
CREATE TRIGGER "AFTER CREATE SEQUENCE" |
11258 |
|
ACTIVE AFTER CREATE SEQUENCE POSITION 0 |
11259 |
|
AS BEGIN END |
11260 |
< |
^ |
11260 |
> |
^ |
11261 |
> |
|
11262 |
|
CREATE TRIGGER "BEFORE ALTER SEQUENCE" |
11263 |
|
ACTIVE BEFORE ALTER SEQUENCE POSITION 0 |
11264 |
|
AS BEGIN END |
11265 |
< |
^ |
11265 |
> |
^ |
11266 |
> |
|
11267 |
|
CREATE TRIGGER "AFTER ALTER SEQUENCE" |
11268 |
|
ACTIVE AFTER ALTER SEQUENCE POSITION 0 |
11269 |
|
AS BEGIN END |
11270 |
< |
^ |
11270 |
> |
^ |
11271 |
> |
|
11272 |
|
CREATE TRIGGER "BEFORE DROP SEQUENCE" |
11273 |
|
ACTIVE BEFORE Drop SEQUENCE POSITION 0 |
11274 |
|
AS BEGIN END |
11275 |
< |
^ |
11275 |
> |
^ |
11276 |
> |
|
11277 |
|
CREATE TRIGGER "AFTER DROP SEQUENCE" |
11278 |
|
ACTIVE AFTER Drop SEQUENCE POSITION 0 |
11279 |
|
AS BEGIN END |
11280 |
< |
^ |
11280 |
> |
^ |
11281 |
> |
|
11282 |
|
CREATE TRIGGER "BEFORE CREATE USER" |
11283 |
|
ACTIVE BEFORE CREATE USER POSITION 0 |
11284 |
|
AS BEGIN END |
11285 |
< |
^ |
11285 |
> |
^ |
11286 |
> |
|
11287 |
|
CREATE TRIGGER "AFTER CREATE USER" |
11288 |
|
ACTIVE AFTER CREATE USER POSITION 0 |
11289 |
|
AS BEGIN END |
11290 |
< |
^ |
11290 |
> |
^ |
11291 |
> |
|
11292 |
|
CREATE TRIGGER "BEFORE ALTER USER" |
11293 |
|
ACTIVE BEFORE ALTER USER POSITION 0 |
11294 |
|
AS BEGIN END |
11295 |
< |
^ |
11295 |
> |
^ |
11296 |
> |
|
11297 |
|
CREATE TRIGGER "AFTER ALTER USER" |
11298 |
|
ACTIVE AFTER ALTER USER POSITION 0 |
11299 |
|
AS BEGIN END |
11300 |
< |
^ |
11300 |
> |
^ |
11301 |
> |
|
11302 |
|
CREATE TRIGGER "BEFORE DROP USER" |
11303 |
|
ACTIVE BEFORE Drop USER POSITION 0 |
11304 |
|
AS BEGIN END |
11305 |
< |
^ |
11305 |
> |
^ |
11306 |
> |
|
11307 |
|
CREATE TRIGGER "AFTER DROP USER" |
11308 |
|
ACTIVE AFTER Drop USER POSITION 0 |
11309 |
|
AS BEGIN END |
11310 |
< |
^ |
11310 |
> |
^ |
11311 |
> |
|
11312 |
|
CREATE TRIGGER "BEFORE CREATE COLLATION" |
11313 |
|
ACTIVE BEFORE CREATE COLLATION POSITION 0 |
11314 |
|
AS BEGIN END |
11315 |
< |
^ |
11315 |
> |
^ |
11316 |
> |
|
11317 |
|
CREATE TRIGGER "AFTER CREATE COLLATION" |
11318 |
|
ACTIVE AFTER CREATE COLLATION POSITION 0 |
11319 |
|
AS BEGIN END |
11320 |
< |
^ |
11320 |
> |
^ |
11321 |
> |
|
11322 |
|
CREATE TRIGGER "BEFORE DROP COLLATION" |
11323 |
|
ACTIVE BEFORE Drop COLLATION POSITION 0 |
11324 |
|
AS BEGIN END |
11325 |
< |
^ |
11325 |
> |
^ |
11326 |
> |
|
11327 |
|
CREATE TRIGGER "AFTER DROP COLLATION" |
11328 |
|
ACTIVE AFTER Drop COLLATION POSITION 0 |
11329 |
|
AS BEGIN END |
11330 |
< |
^ |
11330 |
> |
^ |
11331 |
> |
|
11332 |
|
CREATE TRIGGER "BEFORE ALTER CHARACTER SET" |
11333 |
|
ACTIVE BEFORE ALTER CHARACTER SET POSITION 0 |
11334 |
|
AS BEGIN END |
11335 |
< |
^ |
11335 |
> |
^ |
11336 |
> |
|
11337 |
|
CREATE TRIGGER "AFTER ALTER CHARACTER SET" |
11338 |
|
ACTIVE AFTER ALTER CHARACTER SET POSITION 0 |
11339 |
|
AS BEGIN END |
11340 |
< |
^ |
11340 |
> |
^ |
11341 |
> |
|
11342 |
|
CREATE TRIGGER "BEFORE CREATE PACKAGE" |
11343 |
|
ACTIVE BEFORE CREATE PACKAGE POSITION 0 |
11344 |
|
AS BEGIN END |
11345 |
< |
^ |
11345 |
> |
^ |
11346 |
> |
|
11347 |
|
CREATE TRIGGER "AFTER CREATE PACKAGE" |
11348 |
|
ACTIVE AFTER CREATE PACKAGE POSITION 0 |
11349 |
|
AS BEGIN END |
11350 |
< |
^ |
11350 |
> |
^ |
11351 |
> |
|
11352 |
|
CREATE TRIGGER "BEFORE ALTER PACKAGE" |
11353 |
|
ACTIVE BEFORE ALTER PACKAGE POSITION 0 |
11354 |
|
AS BEGIN END |
11355 |
< |
^ |
11355 |
> |
^ |
11356 |
> |
|
11357 |
|
CREATE TRIGGER "AFTER ALTER PACKAGE" |
11358 |
|
ACTIVE AFTER ALTER PACKAGE POSITION 0 |
11359 |
|
AS BEGIN END |
11360 |
< |
^ |
11360 |
> |
^ |
11361 |
> |
|
11362 |
|
CREATE TRIGGER "BEFORE DROP PACKAGE" |
11363 |
|
ACTIVE BEFORE Drop PACKAGE POSITION 0 |
11364 |
|
AS BEGIN END |
11365 |
< |
^ |
11365 |
> |
^ |
11366 |
> |
|
11367 |
|
CREATE TRIGGER "AFTER DROP PACKAGE" |
11368 |
|
ACTIVE AFTER Drop PACKAGE POSITION 0 |
11369 |
|
AS BEGIN END |
11370 |
< |
^ |
11370 |
> |
^ |
11371 |
> |
|
11372 |
|
CREATE TRIGGER "BEFORE CREATE PACKAGE BODY" |
11373 |
|
ACTIVE BEFORE CREATE PACKAGE BODY POSITION 0 |
11374 |
|
AS BEGIN END |
11375 |
< |
^ |
11375 |
> |
^ |
11376 |
> |
|
11377 |
|
CREATE TRIGGER "AFTER CREATE PACKAGE BODY" |
11378 |
|
ACTIVE AFTER CREATE PACKAGE BODY POSITION 0 |
11379 |
|
AS BEGIN END |
11380 |
< |
^ |
11380 |
> |
^ |
11381 |
> |
|
11382 |
|
CREATE TRIGGER "BEFORE DROP PACKAGE BODY" |
11383 |
|
ACTIVE BEFORE Drop PACKAGE BODY POSITION 0 |
11384 |
|
AS BEGIN END |
11385 |
< |
^ |
11385 |
> |
^ |
11386 |
> |
|
11387 |
|
CREATE TRIGGER "AFTER DROP PACKAGE BODY" |
11388 |
|
ACTIVE AFTER Drop PACKAGE BODY POSITION 0 |
11389 |
|
AS BEGIN END |
11390 |
< |
^ |
11390 |
> |
^ |
11391 |
> |
|
11392 |
|
CREATE TRIGGER "BEFORE ANY DDL STATEMENT" |
11393 |
|
ACTIVE BEFORE ANY DDL STATEMENT POSITION 0 |
11394 |
|
AS BEGIN END |
11395 |
< |
^ |
11395 |
> |
^ |
11396 |
> |
|
11397 |
|
CREATE TRIGGER "AFTER ANY DDL STATEMENT" |
11398 |
|
ACTIVE AFTER ANY DDL STATEMENT POSITION 0 |
11399 |
|
AS BEGIN END |
11400 |
< |
^ |
11400 |
> |
^ |
11401 |
> |
|
11402 |
|
CREATE TRIGGER SET_CUST_NO FOR CUSTOMER |
11403 |
|
ACTIVE BEFORE INSERT POSITION 0 |
11404 |
|
AS |
11406 |
|
if (new.cust_no is null) then |
11407 |
|
new.cust_no = gen_id(cust_no_gen, 1); |
11408 |
|
END |
11409 |
< |
^ |
11409 |
> |
^ |
11410 |
> |
|
11411 |
|
CREATE TRIGGER SET_EMP_NO FOR EMPLOYEE |
11412 |
|
ACTIVE BEFORE INSERT POSITION 0 |
11413 |
|
AS |
11415 |
|
if (new.emp_no is null) then |
11416 |
|
new.emp_no = gen_id(emp_no_gen, 1); |
11417 |
|
END |
11418 |
< |
^ |
11418 |
> |
^ |
11419 |
> |
|
11420 |
|
CREATE TRIGGER SAVE_SALARY_CHANGE FOR EMPLOYEE |
11421 |
|
ACTIVE AFTER UPDATE POSITION 0 |
11422 |
|
AS |
11431 |
|
old.salary, |
11432 |
|
(new.salary - old.salary) * 100 / old.salary); |
11433 |
|
END |
11434 |
< |
^ |
11434 |
> |
^ |
11435 |
> |
|
11436 |
|
CREATE TRIGGER POST_NEW_ORDER FOR SALES |
11437 |
|
ACTIVE AFTER INSERT POSITION 0 |
11438 |
|
AS |
11439 |
|
BEGIN |
11440 |
|
POST_EVENT 'new_order'; |
11441 |
|
END |
11442 |
< |
^ |
11443 |
< |
COMMIT WORK ^ |
11442 |
> |
^ |
11443 |
> |
|
11444 |
> |
COMMIT WORK^ |
11445 |
|
SET TERM ;^ |
11446 |
|
COMMIT WORK; |
11447 |
|
SET AUTODDL OFF; |
11448 |
< |
SET TERM ^ ; |
11448 |
> |
SET TERM ^; |
11449 |
|
|
11450 |
|
/* Package Definitions */ |
11451 |
|
|
11452 |
< |
CREATE PACKAGE BODY FB$OUT |
11452 |
> |
CREATE PACKAGE BODY FB$OUT |
11453 |
|
AS |
11125 |
– |
|
11454 |
|
begin |
11455 |
|
procedure enable |
11456 |
|
as |
11505 |
|
execute procedure clear; |
11506 |
|
end |
11507 |
|
end |
11508 |
< |
^ |
11508 |
> |
^ |
11509 |
|
|
11510 |
< |
CREATE PACKAGE BODY SELECT$TEST |
11510 |
> |
CREATE PACKAGE BODY SELECT$TEST |
11511 |
|
AS |
11184 |
– |
|
11512 |
|
Begin |
11513 |
|
Procedure ShowItems(IPARAM Integer) RETURNS (OutParam integer) |
11514 |
|
As |
11516 |
|
SUSPEND; |
11517 |
|
End |
11518 |
|
End |
11519 |
< |
^ |
11519 |
> |
^ |
11520 |
|
|
11521 |
< |
SET TERM ; ^ |
11521 |
> |
SET TERM ;^ |
11522 |
|
COMMIT WORK; |
11523 |
|
SET AUTODDL ON; |
11524 |
|
COMMIT WORK; |
11525 |
|
SET AUTODDL OFF; |
11526 |
< |
SET TERM ^ ; |
11526 |
> |
SET TERM ^; |
11527 |
|
|
11528 |
|
/* Stored procedure Bodies */ |
11529 |
|
|
11530 |
< |
|
11204 |
< |
ALTER PROCEDURE SHOW_LANGS |
11530 |
> |
ALTER PROCEDURE SHOW_LANGS |
11531 |
|
( |
11532 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
11533 |
|
GRADE SMALLINT, |
11548 |
|
AND (language_req IS NOT NULL)) |
11549 |
|
INTO :languages; |
11550 |
|
IF (languages = ' ') THEN /* Prints 'NULL' instead of blanks */ |
11551 |
< |
languages = 'NULL'; |
11551 |
> |
languages = 'NULL'; |
11552 |
|
i = i +1; |
11553 |
|
SUSPEND; |
11554 |
|
END |
11555 |
|
END |
11556 |
< |
^ |
11231 |
< |
|
11556 |
> |
^ |
11557 |
|
|
11558 |
< |
ALTER PROCEDURE ADD_EMP_PROJ |
11558 |
> |
ALTER PROCEDURE ADD_EMP_PROJ |
11559 |
|
( |
11560 |
|
EMP_NO SMALLINT, |
11561 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
11568 |
|
EXCEPTION unknown_emp_id; |
11569 |
|
END |
11570 |
|
END |
11571 |
< |
^ |
11247 |
< |
|
11571 |
> |
^ |
11572 |
|
|
11573 |
< |
ALTER PROCEDURE ALL_LANGS |
11573 |
> |
ALTER PROCEDURE ALL_LANGS |
11574 |
|
RETURNS |
11575 |
|
( |
11576 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
11580 |
|
) |
11581 |
|
AS |
11582 |
|
BEGIN |
11583 |
< |
FOR SELECT job_code, job_grade, job_country FROM job |
11583 |
> |
FOR SELECT job_code, job_grade, job_country FROM job |
11584 |
|
INTO :code, :grade, :country |
11585 |
|
|
11586 |
|
DO |
11587 |
|
BEGIN |
11588 |
< |
FOR SELECT languages FROM show_langs |
11588 |
> |
FOR SELECT languages FROM show_langs |
11589 |
|
(:code, :grade, :country) INTO :lang DO |
11590 |
|
SUSPEND; |
11591 |
|
/* Put nice separators between rows */ |
11596 |
|
SUSPEND; |
11597 |
|
END |
11598 |
|
END |
11599 |
< |
^ |
11276 |
< |
|
11599 |
> |
^ |
11600 |
|
|
11601 |
< |
ALTER PROCEDURE DELETE_EMPLOYEE |
11601 |
> |
ALTER PROCEDURE DELETE_EMPLOYEE |
11602 |
|
( |
11603 |
|
EMP_NUM INTEGER |
11604 |
|
) |
11609 |
|
|
11610 |
|
/* |
11611 |
|
* If there are any sales records referencing this employee, |
11612 |
< |
* can't delete the employee until the sales are re-assigned |
11612 |
> |
* cannot delete the employee until the sales are re-assigned |
11613 |
|
* to another employee or changed to NULL. |
11614 |
|
*/ |
11615 |
|
SELECT count(po_number) |
11655 |
|
WHERE emp_no = :emp_num; |
11656 |
|
|
11657 |
|
END |
11658 |
< |
^ |
11336 |
< |
|
11658 |
> |
^ |
11659 |
|
|
11660 |
< |
ALTER PROCEDURE DEPT_BUDGET |
11660 |
> |
ALTER PROCEDURE DEPT_BUDGET |
11661 |
|
( |
11662 |
|
DNO CHAR(3) CHARACTER SET NONE |
11663 |
|
) |
11664 |
|
RETURNS |
11665 |
|
( |
11666 |
< |
TOT DECIMAL(12, 2) |
11666 |
> |
TOT DECIMAL(12,2) |
11667 |
|
) |
11668 |
|
AS |
11669 |
< |
DECLARE VARIABLE sumb DECIMAL(12, 2); |
11669 |
> |
DECLARE VARIABLE sumb DECIMAL(12,2); |
11670 |
|
DECLARE VARIABLE rdno CHAR(3); |
11671 |
|
DECLARE VARIABLE cnt INTEGER; |
11672 |
|
BEGIN |
11691 |
|
|
11692 |
|
SUSPEND; |
11693 |
|
END |
11694 |
< |
^ |
11694 |
> |
^ |
11695 |
|
|
11696 |
+ |
ALTER PROCEDURE EMPLOYEE_PAY_STATUS |
11697 |
+ |
( |
11698 |
+ |
EMP_NUM SMALLINT |
11699 |
+ |
) |
11700 |
+ |
RETURNS |
11701 |
+ |
( |
11702 |
+ |
PAY_STATUS VARCHAR(6) CHARACTER SET NONE, |
11703 |
+ |
SALARY NUMERIC(10,2) |
11704 |
+ |
) |
11705 |
+ |
AS |
11706 |
+ |
Declare aCursor CURSOR FOR ( |
11707 |
+ |
Select EMP_NO,SALARY From EMPLOYEE WHERE LAST_NAME = 'unknown'); |
11708 |
+ |
BEGIN |
11709 |
+ |
Select SALARY, Case |
11710 |
+ |
When SALARY > 10000 and SALARY <= 100000 then 'higher' |
11711 |
+ |
When SALARY > 100000 then 'gross' |
11712 |
+ |
else 'lower' End |
11713 |
+ |
From employee |
11714 |
+ |
WHERE emp_no = :EMP_NUM |
11715 |
+ |
into :SALARY, :PAY_STATUS; |
11716 |
+ |
END |
11717 |
+ |
^ |
11718 |
|
|
11719 |
< |
ALTER PROCEDURE GET_EMP_PROJ |
11719 |
> |
ALTER PROCEDURE GET_EMP_PROJ |
11720 |
|
( |
11721 |
|
EMP_NO SMALLINT |
11722 |
|
) |
11733 |
|
DO |
11734 |
|
SUSPEND; |
11735 |
|
END |
11736 |
< |
^ |
11393 |
< |
|
11736 |
> |
^ |
11737 |
|
|
11738 |
< |
ALTER PROCEDURE "Has Space" |
11738 |
> |
ALTER PROCEDURE "Has Space" |
11739 |
|
( |
11740 |
|
ARG1 INTEGER |
11741 |
|
) |
11742 |
|
AS |
11743 |
|
Begin End |
11744 |
< |
^ |
11402 |
< |
|
11744 |
> |
^ |
11745 |
|
|
11746 |
< |
ALTER PROCEDURE MAIL_LABEL |
11746 |
> |
ALTER PROCEDURE MAIL_LABEL |
11747 |
|
( |
11748 |
|
CUST_NO INTEGER |
11749 |
|
) |
11811 |
|
|
11812 |
|
SUSPEND; |
11813 |
|
END |
11814 |
< |
^ |
11473 |
< |
|
11814 |
> |
^ |
11815 |
|
|
11816 |
< |
ALTER PROCEDURE ORG_CHART |
11816 |
> |
ALTER PROCEDURE ORG_CHART |
11817 |
|
RETURNS |
11818 |
|
( |
11819 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
11853 |
|
SUSPEND; |
11854 |
|
END |
11855 |
|
END |
11856 |
< |
^ |
11516 |
< |
|
11856 |
> |
^ |
11857 |
|
|
11858 |
< |
ALTER PROCEDURE SHIP_ORDER |
11858 |
> |
ALTER PROCEDURE SHIP_ORDER |
11859 |
|
( |
11860 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
11861 |
|
) |
11912 |
|
WHERE po_number = :po_num; |
11913 |
|
|
11914 |
|
END |
11915 |
< |
^ |
11576 |
< |
|
11915 |
> |
^ |
11916 |
|
|
11917 |
< |
ALTER PROCEDURE SUB_TOT_BUDGET |
11917 |
> |
ALTER PROCEDURE SUB_TOT_BUDGET |
11918 |
|
( |
11919 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
11920 |
|
) |
11921 |
|
RETURNS |
11922 |
|
( |
11923 |
< |
TOT_BUDGET DECIMAL(12, 2), |
11924 |
< |
AVG_BUDGET DECIMAL(12, 2), |
11925 |
< |
MIN_BUDGET DECIMAL(12, 2), |
11926 |
< |
MAX_BUDGET DECIMAL(12, 2) |
11923 |
> |
TOT_BUDGET DECIMAL(12,2), |
11924 |
> |
AVG_BUDGET DECIMAL(12,2), |
11925 |
> |
MIN_BUDGET DECIMAL(12,2), |
11926 |
> |
MAX_BUDGET DECIMAL(12,2) |
11927 |
|
) |
11928 |
|
AS |
11929 |
|
BEGIN |
11933 |
|
INTO :tot_budget, :avg_budget, :min_budget, :max_budget; |
11934 |
|
SUSPEND; |
11935 |
|
END |
11936 |
< |
^ |
11598 |
< |
|
11936 |
> |
^ |
11937 |
|
|
11938 |
< |
ALTER PROCEDURE "UC SPACE" |
11938 |
> |
ALTER PROCEDURE "UC SPACE" |
11939 |
|
( |
11940 |
|
ARG1 INTEGER |
11941 |
|
) |
11942 |
|
AS |
11943 |
|
Begin End |
11944 |
< |
^ |
11607 |
< |
|
11944 |
> |
^ |
11945 |
|
|
11946 |
< |
ALTER PROCEDURE "iCASE" |
11946 |
> |
ALTER PROCEDURE "iCASE" |
11947 |
|
AS |
11948 |
|
Begin End |
11949 |
< |
^ |
11949 |
> |
^ |
11950 |
|
|
11951 |
< |
SET TERM ; ^ |
11951 |
> |
SET TERM ;^ |
11952 |
|
COMMIT WORK; |
11953 |
|
SET AUTODDL ON; |
11954 |
|
COMMIT WORK; |
11955 |
|
SET AUTODDL OFF; |
11956 |
< |
SET TERM ^ ; |
11956 |
> |
SET TERM ^; |
11957 |
|
|
11958 |
|
/* Stored Function Body */ |
11959 |
|
|
11960 |
|
ALTER FUNCTION F (X INTEGER) |
11961 |
|
RETURNS INTEGER |
11962 |
< |
AS |
11962 |
> |
AS |
11963 |
|
BEGIN |
11964 |
|
RETURN X+1; |
11965 |
|
END |
11966 |
|
^ |
11967 |
|
|
11968 |
< |
|
11632 |
< |
SET TERM ; ^ |
11968 |
> |
SET TERM ;^ |
11969 |
|
COMMIT WORK; |
11970 |
|
SET AUTODDL ON; |
11971 |
|
|
12038 |
|
--- |
12039 |
|
> /* CREATE DATABASE 'inet://localhost//tmp/ibx-testsuite/testsuite1.fdb' PAGE_SIZE 8192 |
12040 |
|
6c6 |
12041 |
< |
< DEFAULT CHARACTER SET NONE; |
12041 |
> |
< DEFAULT CHARACTER SET NONE; |
12042 |
|
--- |
12043 |
|
> DEFAULT CHARACTER SET NONE; */ |
12044 |
|
127c127 |
12045 |
|
< "KEY" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0) NOT NULL, |
12046 |
|
--- |
12047 |
|
> "KEY" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) NOT NULL, |
12048 |
< |
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 |
12048 |
> |
2346c2346 |
12049 |
|
< GRANT SELECT,Update(FIRST_NAME,LAST_NAME) ON TABLE EMPLOYEE TO USER BOB ; |
12050 |
|
--- |
12051 |
|
> GRANT SELECT,Update(LAST_NAME,FIRST_NAME) ON TABLE EMPLOYEE TO USER BOB ; |
12103 |
|
Database Statistics for employee |
12104 |
|
|
12105 |
|
Database "/opt/firebird4.0.0/examples/empbuild/employee.fdb" |
12106 |
< |
Gstat execution time Wed Jul 7 11:45:32 2021 |
12106 |
> |
Gstat execution time Sat Oct 23 14:18:37 2021 |
12107 |
|
|
12108 |
|
Database header page information: |
12109 |
|
Flags 0 |
12110 |
< |
Generation 438 |
12110 |
> |
Generation 4690 |
12111 |
|
System Change Number 0 |
12112 |
|
Page size 8192 |
12113 |
|
ODS version 13.0 |
12114 |
< |
Oldest transaction 456 |
12115 |
< |
Oldest active 457 |
12116 |
< |
Oldest snapshot 457 |
12117 |
< |
Next transaction 457 |
12114 |
> |
Oldest transaction 5176 |
12115 |
> |
Oldest active 5177 |
12116 |
> |
Oldest snapshot 5177 |
12117 |
> |
Next transaction 5177 |
12118 |
|
Sequence number 0 |
12119 |
< |
Next attachment ID 274 |
12119 |
> |
Next attachment ID 4103 |
12120 |
|
Implementation HW=AMD/Intel/x64 little-endian OS=Linux CC=gcc |
12121 |
|
Shadow count 0 |
12122 |
|
Page buffers 0 |
12203 |
|
Primary pointer page: 229, Index root page: 230 |
12204 |
|
Pointer pages: 1, data page slots: 2 |
12205 |
|
Data pages: 2, average fill: 54% |
12206 |
< |
Primary pages: 1, secondary pages: 1, swept pages: 1 |
12206 |
> |
Primary pages: 1, secondary pages: 1, swept pages: 0 |
12207 |
|
Empty pages: 0, full pages: 0 |
12208 |
|
Fill distribution: |
12209 |
|
0 - 19% = 0 |
12264 |
|
60 - 79% = 0 |
12265 |
|
80 - 99% = 0 |
12266 |
|
|
12267 |
< |
Gstat completion time Wed Jul 7 11:45:32 2021 |
12267 |
> |
Gstat completion time Sat Oct 23 14:18:37 2021 |
12268 |
|
|
12269 |
|
|
12270 |
|
|
12274 |
|
firebird4/bin/fbguard: guardian starting /opt/firebird4/bin/firebird |
12275 |
|
|
12276 |
|
Online Validation |
12277 |
< |
11:45:32.71 Validation started |
12277 |
> |
14:18:37.67 Validation started |
12278 |
|
|
12279 |
< |
11:45:32.71 Relation 128 (COUNTRY) |
12280 |
< |
11:45:32.71 process pointer page 0 of 1 |
12281 |
< |
11:45:32.71 Index 1 (RDB$PRIMARY1) |
12282 |
< |
11:45:32.71 Relation 128 (COUNTRY) is ok |
12283 |
< |
|
12284 |
< |
11:45:32.71 Relation 129 (JOB) |
12285 |
< |
11:45:32.71 process pointer page 0 of 1 |
12286 |
< |
11:45:32.71 Index 1 (RDB$PRIMARY2) |
12287 |
< |
11:45:32.71 Index 2 (RDB$FOREIGN3) |
12288 |
< |
11:45:32.71 Index 3 (MAXSALX) |
12289 |
< |
11:45:32.71 Index 4 (MINSALX) |
12290 |
< |
11:45:32.71 Relation 129 (JOB) is ok |
12291 |
< |
|
12292 |
< |
11:45:32.71 Relation 130 (DEPARTMENT) |
12293 |
< |
11:45:32.71 process pointer page 0 of 1 |
12294 |
< |
11:45:32.71 Index 1 (RDB$4) |
12295 |
< |
11:45:32.71 Index 2 (RDB$PRIMARY5) |
12296 |
< |
11:45:32.71 Index 3 (RDB$FOREIGN6) |
12297 |
< |
11:45:32.71 Index 4 (BUDGETX) |
12298 |
< |
11:45:32.71 Index 5 (RDB$FOREIGN10) |
12299 |
< |
11:45:32.71 Relation 130 (DEPARTMENT) is ok |
12300 |
< |
|
12301 |
< |
11:45:32.71 Relation 131 (EMPLOYEE) |
12302 |
< |
11:45:32.71 process pointer page 0 of 1 |
12303 |
< |
11:45:32.71 Index 1 (RDB$PRIMARY7) |
12304 |
< |
11:45:32.71 Index 2 (RDB$FOREIGN8) |
12305 |
< |
11:45:32.71 Index 3 (RDB$FOREIGN9) |
12306 |
< |
11:45:32.71 Index 4 (NAMEX) |
12307 |
< |
11:45:32.71 Relation 131 (EMPLOYEE) is ok |
12308 |
< |
|
12309 |
< |
11:45:32.71 Relation 133 (PROJECT) |
12310 |
< |
11:45:32.71 process pointer page 0 of 1 |
12311 |
< |
11:45:32.71 Index 1 (RDB$11) |
12312 |
< |
11:45:32.71 Index 2 (RDB$PRIMARY12) |
12313 |
< |
11:45:32.71 Index 3 (RDB$FOREIGN13) |
12314 |
< |
11:45:32.71 Index 4 (PRODTYPEX) |
12315 |
< |
11:45:32.71 Relation 133 (PROJECT) is ok |
12316 |
< |
|
12317 |
< |
11:45:32.72 Relation 134 (EMPLOYEE_PROJECT) |
12318 |
< |
11:45:32.72 process pointer page 0 of 1 |
12319 |
< |
11:45:32.72 Index 1 (RDB$PRIMARY14) |
12320 |
< |
11:45:32.72 Index 2 (RDB$FOREIGN15) |
12321 |
< |
11:45:32.72 Index 3 (RDB$FOREIGN16) |
12322 |
< |
11:45:32.72 Relation 134 (EMPLOYEE_PROJECT) is ok |
12323 |
< |
|
12324 |
< |
11:45:32.72 Relation 135 (PROJ_DEPT_BUDGET) |
12325 |
< |
11:45:32.72 process pointer page 0 of 1 |
12326 |
< |
11:45:32.72 Index 1 (RDB$PRIMARY17) |
12327 |
< |
11:45:32.72 Index 2 (RDB$FOREIGN18) |
12328 |
< |
11:45:32.72 Index 3 (RDB$FOREIGN19) |
12329 |
< |
11:45:32.73 Relation 135 (PROJ_DEPT_BUDGET) is ok |
12330 |
< |
|
12331 |
< |
11:45:32.73 Relation 136 (SALARY_HISTORY) |
12332 |
< |
11:45:32.73 process pointer page 0 of 1 |
12333 |
< |
11:45:32.73 Index 1 (RDB$PRIMARY20) |
12334 |
< |
11:45:32.73 Index 2 (RDB$FOREIGN21) |
12335 |
< |
11:45:32.73 Index 3 (CHANGEX) |
12336 |
< |
11:45:32.73 Index 4 (UPDATERX) |
12337 |
< |
11:45:32.73 Relation 136 (SALARY_HISTORY) is ok |
12338 |
< |
|
12339 |
< |
11:45:32.73 Relation 137 (CUSTOMER) |
12340 |
< |
11:45:32.73 process pointer page 0 of 1 |
12341 |
< |
11:45:32.73 Index 1 (RDB$PRIMARY22) |
12342 |
< |
11:45:32.73 Index 2 (RDB$FOREIGN23) |
12343 |
< |
11:45:32.73 Index 3 (CUSTNAMEX) |
12344 |
< |
11:45:32.73 Index 4 (CUSTREGION) |
12345 |
< |
11:45:32.73 Relation 137 (CUSTOMER) is ok |
12346 |
< |
|
12347 |
< |
11:45:32.73 Relation 138 (SALES) |
12348 |
< |
11:45:32.73 process pointer page 0 of 1 |
12349 |
< |
11:45:32.73 Index 1 (RDB$PRIMARY24) |
12350 |
< |
11:45:32.73 Index 2 (RDB$FOREIGN25) |
12351 |
< |
11:45:32.73 Index 3 (RDB$FOREIGN26) |
12352 |
< |
11:45:32.73 Index 4 (NEEDX) |
12353 |
< |
11:45:32.73 Index 5 (QTYX) |
12354 |
< |
11:45:32.73 Index 6 (SALESTATX) |
12355 |
< |
11:45:32.73 Relation 138 (SALES) is ok |
12279 |
> |
14:18:37.67 Relation 128 (COUNTRY) |
12280 |
> |
14:18:37.67 process pointer page 0 of 1 |
12281 |
> |
14:18:37.67 Index 1 (RDB$PRIMARY1) |
12282 |
> |
14:18:37.67 Relation 128 (COUNTRY) is ok |
12283 |
> |
|
12284 |
> |
14:18:37.67 Relation 129 (JOB) |
12285 |
> |
14:18:37.67 process pointer page 0 of 1 |
12286 |
> |
14:18:37.67 Index 1 (RDB$PRIMARY2) |
12287 |
> |
14:18:37.67 Index 2 (RDB$FOREIGN3) |
12288 |
> |
14:18:37.67 Index 3 (MAXSALX) |
12289 |
> |
14:18:37.67 Index 4 (MINSALX) |
12290 |
> |
14:18:37.67 Relation 129 (JOB) is ok |
12291 |
> |
|
12292 |
> |
14:18:37.67 Relation 130 (DEPARTMENT) |
12293 |
> |
14:18:37.67 process pointer page 0 of 1 |
12294 |
> |
14:18:37.67 Index 1 (RDB$4) |
12295 |
> |
14:18:37.67 Index 2 (RDB$PRIMARY5) |
12296 |
> |
14:18:37.67 Index 3 (RDB$FOREIGN6) |
12297 |
> |
14:18:37.67 Index 4 (BUDGETX) |
12298 |
> |
14:18:37.67 Index 5 (RDB$FOREIGN10) |
12299 |
> |
14:18:37.67 Relation 130 (DEPARTMENT) is ok |
12300 |
> |
|
12301 |
> |
14:18:37.67 Relation 131 (EMPLOYEE) |
12302 |
> |
14:18:37.67 process pointer page 0 of 1 |
12303 |
> |
14:18:37.67 Index 1 (RDB$PRIMARY7) |
12304 |
> |
14:18:37.67 Index 2 (RDB$FOREIGN8) |
12305 |
> |
14:18:37.67 Index 3 (RDB$FOREIGN9) |
12306 |
> |
14:18:37.67 Index 4 (NAMEX) |
12307 |
> |
14:18:37.67 Relation 131 (EMPLOYEE) is ok |
12308 |
> |
|
12309 |
> |
14:18:37.67 Relation 133 (PROJECT) |
12310 |
> |
14:18:37.67 process pointer page 0 of 1 |
12311 |
> |
14:18:37.67 Index 1 (RDB$11) |
12312 |
> |
14:18:37.67 Index 2 (RDB$PRIMARY12) |
12313 |
> |
14:18:37.67 Index 3 (RDB$FOREIGN13) |
12314 |
> |
14:18:37.68 Index 4 (PRODTYPEX) |
12315 |
> |
14:18:37.68 Relation 133 (PROJECT) is ok |
12316 |
> |
|
12317 |
> |
14:18:37.68 Relation 134 (EMPLOYEE_PROJECT) |
12318 |
> |
14:18:37.68 process pointer page 0 of 1 |
12319 |
> |
14:18:37.68 Index 1 (RDB$PRIMARY14) |
12320 |
> |
14:18:37.68 Index 2 (RDB$FOREIGN15) |
12321 |
> |
14:18:37.68 Index 3 (RDB$FOREIGN16) |
12322 |
> |
14:18:37.68 Relation 134 (EMPLOYEE_PROJECT) is ok |
12323 |
> |
|
12324 |
> |
14:18:37.68 Relation 135 (PROJ_DEPT_BUDGET) |
12325 |
> |
14:18:37.68 process pointer page 0 of 1 |
12326 |
> |
14:18:37.68 Index 1 (RDB$PRIMARY17) |
12327 |
> |
14:18:37.68 Index 2 (RDB$FOREIGN18) |
12328 |
> |
14:18:37.68 Index 3 (RDB$FOREIGN19) |
12329 |
> |
14:18:37.68 Relation 135 (PROJ_DEPT_BUDGET) is ok |
12330 |
> |
|
12331 |
> |
14:18:37.68 Relation 136 (SALARY_HISTORY) |
12332 |
> |
14:18:37.68 process pointer page 0 of 1 |
12333 |
> |
14:18:37.68 Index 1 (RDB$PRIMARY20) |
12334 |
> |
14:18:37.68 Index 2 (RDB$FOREIGN21) |
12335 |
> |
14:18:37.68 Index 3 (CHANGEX) |
12336 |
> |
14:18:37.69 Index 4 (UPDATERX) |
12337 |
> |
14:18:37.69 Relation 136 (SALARY_HISTORY) is ok |
12338 |
> |
|
12339 |
> |
14:18:37.69 Relation 137 (CUSTOMER) |
12340 |
> |
14:18:37.69 process pointer page 0 of 1 |
12341 |
> |
14:18:37.69 Index 1 (RDB$PRIMARY22) |
12342 |
> |
14:18:37.69 Index 2 (RDB$FOREIGN23) |
12343 |
> |
14:18:37.69 Index 3 (CUSTNAMEX) |
12344 |
> |
14:18:37.69 Index 4 (CUSTREGION) |
12345 |
> |
14:18:37.69 Relation 137 (CUSTOMER) is ok |
12346 |
> |
|
12347 |
> |
14:18:37.69 Relation 138 (SALES) |
12348 |
> |
14:18:37.69 process pointer page 0 of 1 |
12349 |
> |
14:18:37.69 Index 1 (RDB$PRIMARY24) |
12350 |
> |
14:18:37.69 Index 2 (RDB$FOREIGN25) |
12351 |
> |
14:18:37.69 Index 3 (RDB$FOREIGN26) |
12352 |
> |
14:18:37.69 Index 4 (NEEDX) |
12353 |
> |
14:18:37.69 Index 5 (QTYX) |
12354 |
> |
14:18:37.69 Index 6 (SALESTATX) |
12355 |
> |
14:18:37.69 Relation 138 (SALES) is ok |
12356 |
|
|
12357 |
< |
11:45:32.73 Validation finished |
12357 |
> |
14:18:37.69 Validation finished |
12358 |
|
|
12359 |
|
|
12360 |
|
Normal Validation |
13639 |
|
|
13640 |
|
Rows printed = 2 |
13641 |
|
|
13642 |
< |
Current memory = 19,665,456 |
13642 |
> |
Current memory = 19,666,176 |
13643 |
|
Delta memory = 16,032 |
13644 |
< |
Max memory = 19,761,040 |
13645 |
< |
Elapsed time= 0.001 sec |
13646 |
< |
Cpu = 0.000 sec |
13644 |
> |
Max memory = 19,761,504 |
13645 |
> |
Elapsed time= 0.002 sec |
13646 |
> |
Cpu = 0.010 sec |
13647 |
|
Buffers = 2048 |
13648 |
|
Reads = 2 |
13649 |
|
Writes = 0 |
13907 |
|
|
13908 |
|
Rows printed = 2 |
13909 |
|
|
13910 |
< |
Current memory = 19,665,456 |
13910 |
> |
Current memory = 19,666,176 |
13911 |
|
Delta memory = 16,032 |
13912 |
< |
Max memory = 19,761,040 |
13912 |
> |
Max memory = 19,761,504 |
13913 |
|
Elapsed time= 0.102 sec |
13914 |
|
Cpu = 0.000 sec |
13915 |
|
Buffers = 2048 |
15528 |
|
MyText VarChar(1024), |
15529 |
|
Primary Key (RowID) |
15530 |
|
); |
15531 |
< |
Loading data into database table. Started at 07/7/2021 11:46:17.204 |
15532 |
< |
Data load completed at 07/7/2021 11:48:00.164 Elapsed Time = 102960 ms, 100000 records loaded |
15533 |
< |
MD5 checksum = 1c66cd114720b84a4fa21d01f8a0ba2b |
15534 |
< |
Database Read started at 07/7/2021 11:48:00.174 |
15535 |
< |
Read Dataset completed at 07/7/2021 11:48:38.470 Elapsed Time = 38296 ms, 100000 records read |
15536 |
< |
MD5 checksum = 1c66cd114720b84a4fa21d01f8a0ba2b |
15531 |
> |
Loading data into database table. Started at 23/10/2021 14:19:28.924 |
15532 |
> |
Data load completed at 23/10/2021 14:21:13.893 Elapsed Time = 104969 ms, 100000 records loaded |
15533 |
> |
Message Hash = 436daf51ddd32626a439935108ea69c8 |
15534 |
> |
Database Read started at 23/10/2021 14:21:13.906 |
15535 |
> |
Read Dataset completed at 23/10/2021 14:21:44.043 Elapsed Time = 30137 ms, 100000 records read |
15536 |
> |
Message Hash = 436daf51ddd32626a439935108ea69c8 |
15537 |
|
Test Completed successfully |
15538 |
< |
07/7/2021 11:48:38.470 Test 21 passes as long as the MD5 sums are identical |
15538 |
> |
23/10/2021 14:21:44.043 Test 21 passes as long as the checksums are identical |
15539 |
|
|
15540 |
|
|
15541 |
|
------------------------------------------------------ |
15757 |
|
|
15758 |
|
CTE0 recursive: Depts as (Select DEPT_NO, DEPARTMENT, "HEAD_DEPT", cast(DEPARTMENT as VarChar(256)) as DEPT_PATH ,cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH |
15759 |
|
From DEPARTMENT Where HEAD_DEPT is NULL |
15760 |
< |
UNION ALL |
15760 |
> |
UNION ALL |
15761 |
|
Select D.DEPT_NO, D.DEPARTMENT, D.HEAD_DEPT, Depts.DEPT_PATH || ' / ' || D.DEPARTMENT as DEPT_PATH,Depts.DEPT_KEY_PATH || ';' || D.DEPT_NO as DEPT_KEY_PATH From DEPARTMENT D |
15762 |
|
OIN Depts On D.HEAD_DEPT = Depts.DEPT_NO |
15763 |
|
) |
15764 |
|
Select: distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, 2.2, 2..30 A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH |
15771 |
|
Rows: |
15772 |
|
SQL: WITH RECURSIVE Depts AS (Select DEPT_NO, DEPARTMENT, "HEAD_DEPT", cast(DEPARTMENT as VarChar(256)) as DEPT_PATH ,cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH |
15773 |
|
From DEPARTMENT Where HEAD_DEPT is NULL |
15774 |
< |
UNION ALL |
15774 |
> |
UNION ALL |
15775 |
|
Select D.DEPT_NO, D.DEPARTMENT, D.HEAD_DEPT, Depts.DEPT_PATH || ' / ' || D.DEPARTMENT as DEPT_PATH,Depts.DEPT_KEY_PATH || ';' || D.DEPT_NO as DEPT_KEY_PATH From DEPARTMENT D |
15776 |
|
OIN Depts On D.HEAD_DEPT = Depts.DEPT_NO |
15777 |
|
) |
15778 |
|
|
15785 |
|
Updated SQL |
15786 |
|
WITH RECURSIVE Depts AS (Select DEPT_NO, DEPARTMENT, "HEAD_DEPT", cast(DEPARTMENT as VarChar(256)) as DEPT_PATH ,cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH |
15787 |
|
From DEPARTMENT Where HEAD_DEPT is NULL |
15788 |
< |
UNION ALL |
15788 |
> |
UNION ALL |
15789 |
|
Select D.DEPT_NO, D.DEPARTMENT, D.HEAD_DEPT, Depts.DEPT_PATH || ' / ' || D.DEPARTMENT as DEPT_PATH,Depts.DEPT_KEY_PATH || ';' || D.DEPT_NO as DEPT_KEY_PATH From DEPARTMENT D |
15790 |
|
OIN Depts On D.HEAD_DEPT = Depts.DEPT_NO |
15791 |
|
) |
15792 |
|
|
16430 |
|
|
16431 |
|
/* Table: TestTable, Owner: SYSDBA */ |
16432 |
|
|
16433 |
< |
CREATE TABLE "TestTable" |
16433 |
> |
CREATE TABLE "TestTable" |
16434 |
|
( |
16435 |
|
MYKEY INTEGER NOT NULL, |
16436 |
|
TEXTFIELD VARCHAR(32) CHARACTER SET UTF8, |
17171 |
|
|
17172 |
|
/* Table: DBVERSIONINFO, Owner: SYSDBA */ |
17173 |
|
|
17174 |
< |
CREATE TABLE DBVERSIONINFO |
17174 |
> |
CREATE TABLE DBVERSIONINFO |
17175 |
|
( |
17176 |
|
VERSIONNO INTEGER NOT NULL, |
17177 |
|
PRIMARY KEY (VERSIONNO) |
17179 |
|
|
17180 |
|
/* Table: IBDATASETTEST, Owner: SYSDBA */ |
17181 |
|
|
17182 |
< |
CREATE TABLE IBDATASETTEST |
17182 |
> |
CREATE TABLE IBDATASETTEST |
17183 |
|
( |
17184 |
|
KEYFIELD INTEGER NOT NULL, |
17185 |
|
PLAINTEXT VARCHAR(128), |
17196 |
|
/* Data Ends */ |
17197 |
|
|
17198 |
|
CREATE SEQUENCE AGENERATOR; |
17199 |
< |
ALTER SEQUENCE AGENERATOR RESTART WITH 0; |
17200 |
< |
SET TERM ^ ; |
17199 |
> |
ALTER SEQUENCE AGENERATOR RESTART WITH 1; |
17200 |
> |
SET TERM ^; |
17201 |
|
|
17202 |
|
|
17203 |
|
/* Triggers only will work for SQL triggers */ |
17208 |
|
Begin |
17209 |
|
new.ServerSideText = new.KeyField || ' - ' || new.PlainText; |
17210 |
|
End |
17211 |
< |
^ |
17212 |
< |
COMMIT WORK ^ |
17211 |
> |
^ |
17212 |
> |
|
17213 |
> |
COMMIT WORK^ |
17214 |
|
SET TERM ;^ |
17215 |
|
|
17216 |
|
/* Comments on System Objects */ |
17369 |
|
|
17370 |
|
/* Table: DBVERSIONINFO, Owner: SYSDBA */ |
17371 |
|
|
17372 |
< |
CREATE TABLE DBVERSIONINFO |
17372 |
> |
CREATE TABLE DBVERSIONINFO |
17373 |
|
( |
17374 |
|
VERSIONNO INTEGER NOT NULL, |
17375 |
|
PRIMARY KEY (VERSIONNO) |
17377 |
|
|
17378 |
|
/* Table: IBDATASETTEST, Owner: SYSDBA */ |
17379 |
|
|
17380 |
< |
CREATE TABLE IBDATASETTEST |
17380 |
> |
CREATE TABLE IBDATASETTEST |
17381 |
|
( |
17382 |
|
KEYFIELD INTEGER NOT NULL, |
17383 |
|
PLAINTEXT VARCHAR(128), |
17399 |
|
/* Data Ends */ |
17400 |
|
|
17401 |
|
CREATE SEQUENCE AGENERATOR; |
17402 |
< |
ALTER SEQUENCE AGENERATOR RESTART WITH 1; |
17403 |
< |
SET TERM ^ ; |
17402 |
> |
ALTER SEQUENCE AGENERATOR RESTART WITH 2; |
17403 |
> |
SET TERM ^; |
17404 |
|
|
17405 |
|
|
17406 |
|
/* Triggers only will work for SQL triggers */ |
17411 |
|
Begin |
17412 |
|
new.ServerSideText = new.KeyField || ' - ' || new.PlainText; |
17413 |
|
End |
17414 |
< |
^ |
17415 |
< |
COMMIT WORK ^ |
17414 |
> |
^ |
17415 |
> |
|
17416 |
> |
COMMIT WORK^ |
17417 |
|
SET TERM ;^ |
17418 |
|
|
17419 |
|
/* Comments on System Objects */ |
17557 |
|
|
17558 |
|
/* Table: DBVERSIONINFO, Owner: SYSDBA */ |
17559 |
|
|
17560 |
< |
CREATE TABLE DBVERSIONINFO |
17560 |
> |
CREATE TABLE DBVERSIONINFO |
17561 |
|
( |
17562 |
|
VERSIONNO INTEGER NOT NULL, |
17563 |
|
PRIMARY KEY (VERSIONNO) |
17565 |
|
|
17566 |
|
/* Table: IBDATASETTEST, Owner: SYSDBA */ |
17567 |
|
|
17568 |
< |
CREATE TABLE IBDATASETTEST |
17568 |
> |
CREATE TABLE IBDATASETTEST |
17569 |
|
( |
17570 |
|
KEYFIELD INTEGER NOT NULL, |
17571 |
|
PLAINTEXT VARCHAR(128), |
17588 |
|
/* Data Ends */ |
17589 |
|
|
17590 |
|
CREATE SEQUENCE AGENERATOR; |
17591 |
< |
ALTER SEQUENCE AGENERATOR RESTART WITH 2; |
17592 |
< |
SET TERM ^ ; |
17591 |
> |
ALTER SEQUENCE AGENERATOR RESTART WITH 3; |
17592 |
> |
SET TERM ^; |
17593 |
|
|
17594 |
|
|
17595 |
|
/* Triggers only will work for SQL triggers */ |
17600 |
|
Begin |
17601 |
|
new.ServerSideText = new.KeyField || ' - ' || new.PlainText; |
17602 |
|
End |
17603 |
< |
^ |
17604 |
< |
COMMIT WORK ^ |
17603 |
> |
^ |
17604 |
> |
|
17605 |
> |
COMMIT WORK^ |
17606 |
|
SET TERM ;^ |
17607 |
|
|
17608 |
|
/* Comments on System Objects */ |