在尝试创建更新另一个表的触发器时,以下错误在几行上给出,错误似乎在随机行中并没有真正帮助,但这是我第一次尝试在内部使用PL / SQL触发器。
错误(9,5):PL / SQL:忽略语句
错误(9,21):PLS-00548:
触发码:
CREATE OR REPLACE TRIGGER TORRE_T
AFTER DELETE OR INSERT OR UPDATE ON TORRES
FOR EACH ROW
DECLARE
FUSO_T VARCHAR(50 CHAR);
X_TORRES_UTM NUMBER;
Y_TORRES_UTM NUMBER;
X_TORRES NUMBER;
Y_TORRES NUMBER;
BEGIN
FUSO_T := :NEW.FUSO_UTM;
X_TORRES := sde.st_x(:NEW.shape);
Y_TORRES := sde.st_Y(:NEW.shape);
IF INSERTING THEN
IF FUSO_T = '20S' THEN
X_TORRES_UTM := sde.st_x(sde.st_transform(:NEW.shape, 31980));
Y_TORRES_UTM := sde.st_Y(sde.st_transform(:NEW.shape, 31980));
ELSIF FUSO_T = '21S' THEN
X_TORRES_UTM := sde.st_x(sde.st_transform(:NEW.shape, 31981));
Y_TORRES_UTM := sde.st_Y(sde.st_transform(:NEW.shape, 31981));
ELSIF FUSO_T = '22S' THEN
X_TORRES_UTM := sde.st_x(sde.st_transform(:NEW.shape, 31982));
Y_TORRES_UTM := sde.st_Y(sde.st_transform(:NEW.shape, 31982));
END IF;
INSERT INTO COORDTORRES(OBJECTID, GEOCODIGO, LONGITUDEDEC, LATITUDEDEC, LONGITUDEGMS, LATITUDEGMS, COORDXUTM, COORDYUTM, FUSOUTM)
VALUES(
:NEW.OBJECTID,
:NEW.CODIGO,
X_TORRES,
Y_TORRES,
replace(abs(trunc(X_TORRES))||'°'||to_char(trunc((abs(X_TORRES) - abs(trunc(X_TORRES)))*60), '00')||'''' || to_char((((abs(X_TORRES) - abs(trunc(X_TORRES)))*60) - trunc(((abs(X_TORRES) - abs(trunc(X_TORRES)))*60))) * 60, '00.00') || '"' || 'W', ' '),
replace(abs(trunc(Y_TORRES))||'°'||to_char(trunc((abs(Y_TORRES) - abs(trunc(Y_TORRES)))*60), '00')||'''' || to_char((((abs(Y_TORRES) - abs(trunc(Y_TORRES)))*60) - trunc(((abs(Y_TORRES) - abs(trunc(Y_TORRES)))*60))) * 60, '00.00') || '"' || 'N', ' '),
X_TORRES_UTM,
Y_TORRES_UTM,
FUSO_T
);
END IF;
END;
SQLDeveloper上的完整错误堆栈:
Error(9,5): PL/SQL: Statement ignored
Error(9,21): PLS-00548: Invalid use of operator
Error(10,5): PL/SQL: Statement ignored
Error(10,21): PLS-00548: Invalid use of operator
Error(13,13): PL/SQL: Statement ignored
Error(13,33): PLS-00548: Invalid use of operator
Error(14,13): PL/SQL: Statement ignored
Error(14,33): PLS-00548: Invalid use of operator
Error(16,13): PL/SQL: Statement ignored
Error(16,33): PLS-00548: Invalid use of operator
Error(17,13): PL/SQL: Statement ignored
Error(17,33): PLS-00548: Invalid use of operator
Error(19,13): PL/SQL: Statement ignored
Error(19,33): PLS-00548: Invalid use of operator
Error(20,13): PL/SQL: Statement ignored
Error(20,33): PLS-00548: Invalid use of operator.