5 |
|
|
6 |
|
CREATE DATABASE 'inet://localhost//tmp/ibx-testsuite/testsuite1.fdb' PAGE_SIZE 8192 |
7 |
|
|
8 |
< |
DEFAULT CHARACTER SET NONE; |
8 |
> |
DEFAULT CHARACTER SET NONE; |
9 |
|
COMMENT ON DATABASE IS 'Employee Test DB'; |
10 |
|
|
11 |
|
/* Domain definitions */ |
12 |
|
|
13 |
|
CREATE DOMAIN ADDRESSLINE AS VARCHAR(30); |
14 |
< |
CREATE DOMAIN BUDGET AS DECIMAL(12, 2) |
14 |
> |
CREATE DOMAIN BUDGET AS DECIMAL(12,2) |
15 |
|
DEFAULT 50000; |
16 |
|
CREATE DOMAIN COUNTRYNAME AS VARCHAR(15); |
17 |
|
CREATE DOMAIN CUSTNO AS INTEGER; |
27 |
|
CREATE DOMAIN PRODTYPE AS VARCHAR(12) |
28 |
|
DEFAULT 'software' NOT NULL; |
29 |
|
CREATE DOMAIN PROJNO AS CHAR(5); |
30 |
< |
CREATE DOMAIN SALARY AS NUMERIC(10, 2) |
30 |
> |
CREATE DOMAIN SALARY AS NUMERIC(10,2) |
31 |
|
DEFAULT 0; |
32 |
|
|
33 |
|
/* Table: COUNTRIES, Owner: SYSDBA */ |
34 |
|
|
35 |
< |
CREATE TABLE COUNTRIES |
35 |
> |
CREATE TABLE COUNTRIES |
36 |
|
( |
37 |
|
COUNTRY VARCHAR(64) NOT NULL, |
38 |
|
NONEU SMALLINT, |
45 |
|
|
46 |
|
/* Table: COUNTRY, Owner: SYSDBA */ |
47 |
|
|
48 |
< |
CREATE TABLE COUNTRY |
48 |
> |
CREATE TABLE COUNTRY |
49 |
|
( |
50 |
|
COUNTRY COUNTRYNAME NOT NULL, |
51 |
|
CURRENCY VARCHAR(10) NOT NULL, |
54 |
|
|
55 |
|
/* Table: CUSTOMER, Owner: SYSDBA */ |
56 |
|
|
57 |
< |
CREATE TABLE CUSTOMER |
57 |
> |
CREATE TABLE CUSTOMER |
58 |
|
( |
59 |
|
CUST_NO CUSTNO NOT NULL, |
60 |
|
CUSTOMER VARCHAR(25) NOT NULL, |
74 |
|
|
75 |
|
/* Table: DEPARTMENT, Owner: SYSDBA */ |
76 |
|
|
77 |
< |
CREATE TABLE DEPARTMENT |
77 |
> |
CREATE TABLE DEPARTMENT |
78 |
|
( |
79 |
|
DEPT_NO DEPTNO NOT NULL, |
80 |
|
DEPARTMENT VARCHAR(25) NOT NULL, |
89 |
|
|
90 |
|
/* Table: EMPLOYEE, Owner: SYSDBA */ |
91 |
|
|
92 |
< |
CREATE TABLE EMPLOYEE |
92 |
> |
CREATE TABLE EMPLOYEE |
93 |
|
( |
94 |
|
EMP_NO EMPNO NOT NULL, |
95 |
|
FIRST_NAME FIRSTNAME NOT NULL, |
107 |
|
|
108 |
|
/* Table: EMPLOYEE_PROJECT, Owner: SYSDBA */ |
109 |
|
|
110 |
< |
CREATE TABLE EMPLOYEE_PROJECT |
110 |
> |
CREATE TABLE EMPLOYEE_PROJECT |
111 |
|
( |
112 |
|
EMP_NO EMPNO NOT NULL, |
113 |
|
PROJ_ID PROJNO NOT NULL, |
116 |
|
|
117 |
|
/* Table: FB$OUT_TABLE, Owner: SYSDBA */ |
118 |
|
|
119 |
< |
CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE |
119 |
> |
CREATE GLOBAL TEMPORARY TABLE FB$OUT_TABLE |
120 |
|
( |
121 |
|
LINE_NUM INTEGER, |
122 |
|
CONTENT FB$OUT_TYPE |
124 |
|
|
125 |
|
/* Table: JOB, Owner: SYSDBA */ |
126 |
|
|
127 |
< |
CREATE TABLE JOB |
127 |
> |
CREATE TABLE JOB |
128 |
|
( |
129 |
|
JOB_CODE JOBCODE NOT NULL, |
130 |
|
JOB_GRADE JOBGRADE NOT NULL, |
139 |
|
|
140 |
|
/* Table: PROJECT, Owner: SYSDBA */ |
141 |
|
|
142 |
< |
CREATE TABLE PROJECT |
142 |
> |
CREATE TABLE PROJECT |
143 |
|
( |
144 |
|
PROJ_ID PROJNO NOT NULL, |
145 |
|
PROJ_NAME VARCHAR(20) NOT NULL, |
152 |
|
|
153 |
|
/* Table: PROJ_DEPT_BUDGET, Owner: SYSDBA */ |
154 |
|
|
155 |
< |
CREATE TABLE PROJ_DEPT_BUDGET |
155 |
> |
CREATE TABLE PROJ_DEPT_BUDGET |
156 |
|
( |
157 |
|
FISCAL_YEAR INTEGER NOT NULL, |
158 |
|
PROJ_ID PROJNO NOT NULL, |
164 |
|
|
165 |
|
/* Table: SALARY_HISTORY, Owner: SYSDBA */ |
166 |
|
|
167 |
< |
CREATE TABLE SALARY_HISTORY |
167 |
> |
CREATE TABLE SALARY_HISTORY |
168 |
|
( |
169 |
|
EMP_NO EMPNO NOT NULL, |
170 |
|
CHANGE_DATE TIMESTAMP DEFAULT 'NOW' NOT NULL, |
177 |
|
|
178 |
|
/* Table: SALES, Owner: SYSDBA */ |
179 |
|
|
180 |
< |
CREATE TABLE SALES |
180 |
> |
CREATE TABLE SALES |
181 |
|
( |
182 |
|
PO_NUMBER PONUMBER NOT NULL, |
183 |
|
CUST_NO CUSTNO NOT NULL, |
188 |
|
DATE_NEEDED TIMESTAMP, |
189 |
|
PAID CHAR(1) DEFAULT 'n', |
190 |
|
QTY_ORDERED INTEGER DEFAULT 1 NOT NULL, |
191 |
< |
TOTAL_VALUE DECIMAL(9, 2) NOT NULL, |
191 |
> |
TOTAL_VALUE DECIMAL(9,2) NOT NULL, |
192 |
|
DISCOUNT FLOAT DEFAULT 0 NOT NULL, |
193 |
|
ITEM_TYPE PRODTYPE, |
194 |
|
AGED COMPUTED BY (ship_date - order_date), |
201 |
|
TIMESTAMP, INTEGER |
202 |
|
RETURNS TIMESTAMP |
203 |
|
ENTRY_POINT 'addDay' MODULE_NAME 'fbudf' |
204 |
– |
|
204 |
|
; |
205 |
|
|
206 |
|
|
207 |
|
DECLARE EXTERNAL FUNCTION I64TRUNCATE |
208 |
< |
NUMERIC(18, 0) BY DESCRIPTOR, NUMERIC(18, 0) BY DESCRIPTOR |
208 |
> |
NUMERIC(18,0) BY DESCRIPTOR, NUMERIC(18,0) BY DESCRIPTOR |
209 |
|
RETURNS PARAMETER 2 |
210 |
|
ENTRY_POINT 'fbtruncate' MODULE_NAME 'fbudf' |
212 |
– |
|
211 |
|
; |
212 |
|
|
213 |
|
|
215 |
|
TIMESTAMP, INTEGER NULL, CSTRING(10) CHARACTER SET NONE, CSTRING(10) CHARACTER SET NONE BY DESCRIPTOR |
216 |
|
RETURNS CSTRING(32) CHARACTER SET NONE FREE_IT |
217 |
|
ENTRY_POINT 'testit' MODULE_NAME 'fbudf' |
220 |
– |
|
218 |
|
; |
219 |
|
|
220 |
|
|
945 |
|
/* View: DEPTLIST, Owner: SYSDBA */ |
946 |
|
|
947 |
|
CREATE VIEW DEPTLIST ( |
948 |
< |
EMP_NO, |
949 |
< |
FIRST_NAME, |
950 |
< |
LAST_NAME, |
951 |
< |
PHONE_EXT, |
952 |
< |
HIRE_DATE, |
953 |
< |
DEPT_NO, |
954 |
< |
JOB_CODE, |
955 |
< |
JOB_GRADE, |
956 |
< |
JOB_COUNTRY, |
957 |
< |
SALARY, |
958 |
< |
FULL_NAME, |
959 |
< |
DEPT_PATH, |
948 |
> |
EMP_NO, |
949 |
> |
FIRST_NAME, |
950 |
> |
LAST_NAME, |
951 |
> |
PHONE_EXT, |
952 |
> |
HIRE_DATE, |
953 |
> |
DEPT_NO, |
954 |
> |
JOB_CODE, |
955 |
> |
JOB_GRADE, |
956 |
> |
JOB_COUNTRY, |
957 |
> |
SALARY, |
958 |
> |
FULL_NAME, |
959 |
> |
DEPT_PATH, |
960 |
|
DEPT_KEY_PATH |
961 |
|
) AS |
962 |
|
with recursive Depts As ( |
979 |
|
/* View: PHONE_LIST, Owner: SYSDBA */ |
980 |
|
|
981 |
|
CREATE VIEW PHONE_LIST ( |
982 |
< |
EMP_NO, |
983 |
< |
FIRST_NAME, |
984 |
< |
LAST_NAME, |
985 |
< |
PHONE_EXT, |
986 |
< |
LOCATION, |
982 |
> |
EMP_NO, |
983 |
> |
FIRST_NAME, |
984 |
> |
LAST_NAME, |
985 |
> |
PHONE_EXT, |
986 |
> |
LOCATION, |
987 |
|
PHONE_NO |
988 |
|
) AS |
989 |
|
SELECT |
1085 |
|
CREATE EXCEPTION UNKNOWN_EMP_ID 'Invalid employee number or project id.'; |
1086 |
|
COMMIT WORK; |
1087 |
|
SET AUTODDL OFF; |
1088 |
< |
SET TERM ^ ; |
1092 |
< |
|
1093 |
< |
SET TERM ; ^ |
1094 |
< |
COMMIT WORK; |
1095 |
< |
SET AUTODDL ON; |
1096 |
< |
COMMIT WORK; |
1097 |
< |
SET AUTODDL OFF; |
1098 |
< |
SET TERM ^ ; |
1088 |
> |
SET TERM ^; |
1089 |
|
|
1090 |
|
/* Stored procedures Definitions*/ |
1091 |
|
|
1092 |
< |
CREATE PROCEDURE SHOW_LANGS |
1092 |
> |
CREATE PROCEDURE SHOW_LANGS |
1093 |
|
( |
1094 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
1095 |
|
GRADE SMALLINT, |
1101 |
|
) |
1102 |
|
AS |
1103 |
|
BEGIN SUSPEND; EXIT; END |
1114 |
– |
|
1104 |
|
^ |
1105 |
|
|
1106 |
< |
CREATE PROCEDURE ADD_EMP_PROJ |
1106 |
> |
CREATE PROCEDURE ADD_EMP_PROJ |
1107 |
|
( |
1108 |
|
EMP_NO SMALLINT, |
1109 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
1110 |
|
) |
1111 |
|
AS |
1112 |
|
BEGIN EXIT; END |
1124 |
– |
|
1113 |
|
^ |
1114 |
|
|
1115 |
< |
CREATE PROCEDURE ALL_LANGS |
1115 |
> |
CREATE PROCEDURE ALL_LANGS |
1116 |
|
RETURNS |
1117 |
|
( |
1118 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
1122 |
|
) |
1123 |
|
AS |
1124 |
|
BEGIN SUSPEND; EXIT; END |
1137 |
– |
|
1125 |
|
^ |
1126 |
|
|
1127 |
< |
CREATE PROCEDURE DELETE_EMPLOYEE |
1127 |
> |
CREATE PROCEDURE DELETE_EMPLOYEE |
1128 |
|
( |
1129 |
|
EMP_NUM INTEGER |
1130 |
|
) |
1131 |
|
AS |
1132 |
|
BEGIN EXIT; END |
1146 |
– |
|
1133 |
|
^ |
1134 |
|
|
1135 |
< |
CREATE PROCEDURE DEPT_BUDGET |
1135 |
> |
CREATE PROCEDURE DEPT_BUDGET |
1136 |
|
( |
1137 |
|
DNO CHAR(3) CHARACTER SET NONE |
1138 |
|
) |
1139 |
|
RETURNS |
1140 |
|
( |
1141 |
< |
TOT DECIMAL(12, 2) |
1141 |
> |
TOT DECIMAL(12,2) |
1142 |
|
) |
1143 |
|
AS |
1144 |
|
BEGIN SUSPEND; EXIT; END |
1159 |
– |
|
1145 |
|
^ |
1146 |
|
|
1147 |
< |
CREATE PROCEDURE GET_EMP_PROJ |
1147 |
> |
CREATE PROCEDURE GET_EMP_PROJ |
1148 |
|
( |
1149 |
|
EMP_NO SMALLINT |
1150 |
|
) |
1154 |
|
) |
1155 |
|
AS |
1156 |
|
BEGIN SUSPEND; EXIT; END |
1172 |
– |
|
1157 |
|
^ |
1158 |
|
|
1159 |
< |
CREATE PROCEDURE "Has Space" |
1159 |
> |
CREATE PROCEDURE "Has Space" |
1160 |
|
( |
1161 |
|
ARG1 INTEGER |
1162 |
|
) |
1163 |
|
AS |
1164 |
|
BEGIN EXIT; END |
1181 |
– |
|
1165 |
|
^ |
1166 |
|
|
1167 |
< |
CREATE PROCEDURE MAIL_LABEL |
1167 |
> |
CREATE PROCEDURE MAIL_LABEL |
1168 |
|
( |
1169 |
|
CUST_NO INTEGER |
1170 |
|
) |
1179 |
|
) |
1180 |
|
AS |
1181 |
|
BEGIN SUSPEND; EXIT; END |
1199 |
– |
|
1182 |
|
^ |
1183 |
|
|
1184 |
< |
CREATE PROCEDURE ORG_CHART |
1184 |
> |
CREATE PROCEDURE ORG_CHART |
1185 |
|
RETURNS |
1186 |
|
( |
1187 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
1192 |
|
) |
1193 |
|
AS |
1194 |
|
BEGIN SUSPEND; EXIT; END |
1213 |
– |
|
1195 |
|
^ |
1196 |
|
|
1197 |
< |
CREATE PROCEDURE SHIP_ORDER |
1197 |
> |
CREATE PROCEDURE SHIP_ORDER |
1198 |
|
( |
1199 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
1200 |
|
) |
1201 |
|
AS |
1202 |
|
BEGIN EXIT; END |
1222 |
– |
|
1203 |
|
^ |
1204 |
|
|
1205 |
< |
CREATE PROCEDURE SUB_TOT_BUDGET |
1205 |
> |
CREATE PROCEDURE SUB_TOT_BUDGET |
1206 |
|
( |
1207 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
1208 |
|
) |
1209 |
|
RETURNS |
1210 |
|
( |
1211 |
< |
TOT_BUDGET DECIMAL(12, 2), |
1212 |
< |
AVG_BUDGET DECIMAL(12, 2), |
1213 |
< |
MIN_BUDGET DECIMAL(12, 2), |
1214 |
< |
MAX_BUDGET DECIMAL(12, 2) |
1211 |
> |
TOT_BUDGET DECIMAL(12,2), |
1212 |
> |
AVG_BUDGET DECIMAL(12,2), |
1213 |
> |
MIN_BUDGET DECIMAL(12,2), |
1214 |
> |
MAX_BUDGET DECIMAL(12,2) |
1215 |
|
) |
1216 |
|
AS |
1217 |
|
BEGIN SUSPEND; EXIT; END |
1238 |
– |
|
1218 |
|
^ |
1219 |
|
|
1220 |
< |
CREATE PROCEDURE "UC SPACE" |
1220 |
> |
CREATE PROCEDURE "UC SPACE" |
1221 |
|
( |
1222 |
|
ARG1 INTEGER |
1223 |
|
) |
1224 |
|
AS |
1225 |
|
BEGIN EXIT; END |
1247 |
– |
|
1226 |
|
^ |
1227 |
|
|
1228 |
< |
CREATE PROCEDURE "iCASE" |
1228 |
> |
CREATE PROCEDURE "iCASE" |
1229 |
|
AS |
1230 |
|
BEGIN EXIT; END |
1253 |
– |
|
1231 |
|
^ |
1232 |
|
|
1233 |
< |
SET TERM ; ^ |
1257 |
< |
COMMIT WORK; |
1258 |
< |
SET AUTODDL ON; |
1259 |
< |
COMMIT WORK; |
1260 |
< |
SET AUTODDL OFF; |
1261 |
< |
SET TERM ^ ; |
1262 |
< |
|
1263 |
< |
SET TERM ; ^ |
1233 |
> |
SET TERM ;^ |
1234 |
|
COMMIT WORK; |
1235 |
|
SET AUTODDL ON; |
1236 |
< |
SET TERM ^ ; |
1236 |
> |
SET TERM ^; |
1237 |
|
|
1238 |
|
|
1239 |
|
/* Triggers only will work for SQL triggers */ |
1245 |
|
if (new.cust_no is null) then |
1246 |
|
new.cust_no = gen_id(cust_no_gen, 1); |
1247 |
|
END |
1248 |
< |
^ |
1248 |
> |
^ |
1249 |
> |
|
1250 |
|
CREATE TRIGGER SET_EMP_NO FOR EMPLOYEE |
1251 |
|
ACTIVE BEFORE INSERT POSITION 0 |
1252 |
|
AS |
1254 |
|
if (new.emp_no is null) then |
1255 |
|
new.emp_no = gen_id(emp_no_gen, 1); |
1256 |
|
END |
1257 |
< |
^ |
1257 |
> |
^ |
1258 |
> |
|
1259 |
|
CREATE TRIGGER SAVE_SALARY_CHANGE FOR EMPLOYEE |
1260 |
|
ACTIVE AFTER UPDATE POSITION 0 |
1261 |
|
AS |
1270 |
|
old.salary, |
1271 |
|
(new.salary - old.salary) * 100 / old.salary); |
1272 |
|
END |
1273 |
< |
^ |
1273 |
> |
^ |
1274 |
> |
|
1275 |
|
CREATE TRIGGER POST_NEW_ORDER FOR SALES |
1276 |
|
ACTIVE AFTER INSERT POSITION 0 |
1277 |
|
AS |
1278 |
|
BEGIN |
1279 |
|
POST_EVENT 'new_order'; |
1280 |
|
END |
1281 |
< |
^ |
1282 |
< |
COMMIT WORK ^ |
1281 |
> |
^ |
1282 |
> |
|
1283 |
> |
COMMIT WORK^ |
1284 |
|
SET TERM ;^ |
1285 |
|
COMMIT WORK; |
1286 |
|
SET AUTODDL OFF; |
1287 |
< |
SET TERM ^ ; |
1287 |
> |
SET TERM ^; |
1288 |
|
|
1289 |
|
/* Stored procedure Bodies */ |
1290 |
|
|
1291 |
< |
|
1318 |
< |
ALTER PROCEDURE SHOW_LANGS |
1291 |
> |
ALTER PROCEDURE SHOW_LANGS |
1292 |
|
( |
1293 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
1294 |
|
GRADE SMALLINT, |
1309 |
|
AND (language_req IS NOT NULL)) |
1310 |
|
INTO :languages; |
1311 |
|
IF (languages = ' ') THEN /* Prints 'NULL' instead of blanks */ |
1312 |
< |
languages = 'NULL'; |
1312 |
> |
languages = 'NULL'; |
1313 |
|
i = i +1; |
1314 |
|
SUSPEND; |
1315 |
|
END |
1316 |
|
END |
1317 |
< |
^ |
1345 |
< |
|
1317 |
> |
^ |
1318 |
|
|
1319 |
< |
ALTER PROCEDURE ADD_EMP_PROJ |
1319 |
> |
ALTER PROCEDURE ADD_EMP_PROJ |
1320 |
|
( |
1321 |
|
EMP_NO SMALLINT, |
1322 |
|
PROJ_ID CHAR(5) CHARACTER SET NONE |
1329 |
|
EXCEPTION unknown_emp_id; |
1330 |
|
END |
1331 |
|
END |
1332 |
< |
^ |
1361 |
< |
|
1332 |
> |
^ |
1333 |
|
|
1334 |
< |
ALTER PROCEDURE ALL_LANGS |
1334 |
> |
ALTER PROCEDURE ALL_LANGS |
1335 |
|
RETURNS |
1336 |
|
( |
1337 |
|
CODE VARCHAR(5) CHARACTER SET NONE, |
1341 |
|
) |
1342 |
|
AS |
1343 |
|
BEGIN |
1344 |
< |
FOR SELECT job_code, job_grade, job_country FROM job |
1344 |
> |
FOR SELECT job_code, job_grade, job_country FROM job |
1345 |
|
INTO :code, :grade, :country |
1346 |
|
|
1347 |
|
DO |
1348 |
|
BEGIN |
1349 |
< |
FOR SELECT languages FROM show_langs |
1349 |
> |
FOR SELECT languages FROM show_langs |
1350 |
|
(:code, :grade, :country) INTO :lang DO |
1351 |
|
SUSPEND; |
1352 |
|
/* Put nice separators between rows */ |
1357 |
|
SUSPEND; |
1358 |
|
END |
1359 |
|
END |
1360 |
< |
^ |
1390 |
< |
|
1360 |
> |
^ |
1361 |
|
|
1362 |
< |
ALTER PROCEDURE DELETE_EMPLOYEE |
1362 |
> |
ALTER PROCEDURE DELETE_EMPLOYEE |
1363 |
|
( |
1364 |
|
EMP_NUM INTEGER |
1365 |
|
) |
1370 |
|
|
1371 |
|
/* |
1372 |
|
* If there are any sales records referencing this employee, |
1373 |
< |
* can't delete the employee until the sales are re-assigned |
1373 |
> |
* cannot delete the employee until the sales are re-assigned |
1374 |
|
* to another employee or changed to NULL. |
1375 |
|
*/ |
1376 |
|
SELECT count(po_number) |
1416 |
|
WHERE emp_no = :emp_num; |
1417 |
|
|
1418 |
|
END |
1419 |
< |
^ |
1450 |
< |
|
1419 |
> |
^ |
1420 |
|
|
1421 |
< |
ALTER PROCEDURE DEPT_BUDGET |
1421 |
> |
ALTER PROCEDURE DEPT_BUDGET |
1422 |
|
( |
1423 |
|
DNO CHAR(3) CHARACTER SET NONE |
1424 |
|
) |
1425 |
|
RETURNS |
1426 |
|
( |
1427 |
< |
TOT DECIMAL(12, 2) |
1427 |
> |
TOT DECIMAL(12,2) |
1428 |
|
) |
1429 |
|
AS |
1430 |
< |
DECLARE VARIABLE sumb DECIMAL(12, 2); |
1430 |
> |
DECLARE VARIABLE sumb DECIMAL(12,2); |
1431 |
|
DECLARE VARIABLE rdno CHAR(3); |
1432 |
|
DECLARE VARIABLE cnt INTEGER; |
1433 |
|
BEGIN |
1452 |
|
|
1453 |
|
SUSPEND; |
1454 |
|
END |
1455 |
< |
^ |
1487 |
< |
|
1455 |
> |
^ |
1456 |
|
|
1457 |
< |
ALTER PROCEDURE GET_EMP_PROJ |
1457 |
> |
ALTER PROCEDURE GET_EMP_PROJ |
1458 |
|
( |
1459 |
|
EMP_NO SMALLINT |
1460 |
|
) |
1471 |
|
DO |
1472 |
|
SUSPEND; |
1473 |
|
END |
1474 |
< |
^ |
1507 |
< |
|
1474 |
> |
^ |
1475 |
|
|
1476 |
< |
ALTER PROCEDURE "Has Space" |
1476 |
> |
ALTER PROCEDURE "Has Space" |
1477 |
|
( |
1478 |
|
ARG1 INTEGER |
1479 |
|
) |
1480 |
|
AS |
1481 |
|
Begin End |
1482 |
< |
^ |
1516 |
< |
|
1482 |
> |
^ |
1483 |
|
|
1484 |
< |
ALTER PROCEDURE MAIL_LABEL |
1484 |
> |
ALTER PROCEDURE MAIL_LABEL |
1485 |
|
( |
1486 |
|
CUST_NO INTEGER |
1487 |
|
) |
1549 |
|
|
1550 |
|
SUSPEND; |
1551 |
|
END |
1552 |
< |
^ |
1587 |
< |
|
1552 |
> |
^ |
1553 |
|
|
1554 |
< |
ALTER PROCEDURE ORG_CHART |
1554 |
> |
ALTER PROCEDURE ORG_CHART |
1555 |
|
RETURNS |
1556 |
|
( |
1557 |
|
HEAD_DEPT CHAR(25) CHARACTER SET NONE, |
1591 |
|
SUSPEND; |
1592 |
|
END |
1593 |
|
END |
1594 |
< |
^ |
1630 |
< |
|
1594 |
> |
^ |
1595 |
|
|
1596 |
< |
ALTER PROCEDURE SHIP_ORDER |
1596 |
> |
ALTER PROCEDURE SHIP_ORDER |
1597 |
|
( |
1598 |
|
PO_NUM CHAR(8) CHARACTER SET NONE |
1599 |
|
) |
1650 |
|
WHERE po_number = :po_num; |
1651 |
|
|
1652 |
|
END |
1653 |
< |
^ |
1690 |
< |
|
1653 |
> |
^ |
1654 |
|
|
1655 |
< |
ALTER PROCEDURE SUB_TOT_BUDGET |
1655 |
> |
ALTER PROCEDURE SUB_TOT_BUDGET |
1656 |
|
( |
1657 |
|
HEAD_DEPT CHAR(3) CHARACTER SET NONE |
1658 |
|
) |
1659 |
|
RETURNS |
1660 |
|
( |
1661 |
< |
TOT_BUDGET DECIMAL(12, 2), |
1662 |
< |
AVG_BUDGET DECIMAL(12, 2), |
1663 |
< |
MIN_BUDGET DECIMAL(12, 2), |
1664 |
< |
MAX_BUDGET DECIMAL(12, 2) |
1661 |
> |
TOT_BUDGET DECIMAL(12,2), |
1662 |
> |
AVG_BUDGET DECIMAL(12,2), |
1663 |
> |
MIN_BUDGET DECIMAL(12,2), |
1664 |
> |
MAX_BUDGET DECIMAL(12,2) |
1665 |
|
) |
1666 |
|
AS |
1667 |
|
BEGIN |
1671 |
|
INTO :tot_budget, :avg_budget, :min_budget, :max_budget; |
1672 |
|
SUSPEND; |
1673 |
|
END |
1674 |
< |
^ |
1712 |
< |
|
1674 |
> |
^ |
1675 |
|
|
1676 |
< |
ALTER PROCEDURE "UC SPACE" |
1676 |
> |
ALTER PROCEDURE "UC SPACE" |
1677 |
|
( |
1678 |
|
ARG1 INTEGER |
1679 |
|
) |
1680 |
|
AS |
1681 |
|
Begin End |
1682 |
< |
^ |
1721 |
< |
|
1682 |
> |
^ |
1683 |
|
|
1684 |
< |
ALTER PROCEDURE "iCASE" |
1684 |
> |
ALTER PROCEDURE "iCASE" |
1685 |
|
AS |
1686 |
|
Begin End |
1687 |
< |
^ |
1727 |
< |
|
1728 |
< |
SET TERM ; ^ |
1729 |
< |
COMMIT WORK; |
1730 |
< |
SET AUTODDL ON; |
1731 |
< |
COMMIT WORK; |
1732 |
< |
SET AUTODDL OFF; |
1733 |
< |
SET TERM ^ ; |
1734 |
< |
|
1687 |
> |
^ |
1688 |
|
|
1689 |
< |
SET TERM ; ^ |
1689 |
> |
SET TERM ;^ |
1690 |
|
COMMIT WORK; |
1691 |
|
SET AUTODDL ON; |
1692 |
|
|
1727 |
|
GRANT EXECUTE ON PROCEDURE SHIP_ORDER TO USER PUBLIC WITH GRANT OPTION ; |
1728 |
|
GRANT EXECUTE ON PROCEDURE SHOW_LANGS TO USER PUBLIC WITH GRANT OPTION ; |
1729 |
|
GRANT EXECUTE ON PROCEDURE SUB_TOT_BUDGET TO USER PUBLIC WITH GRANT OPTION ; |
1777 |
– |
|