I am using the version of DbVisualizer Pro 9.5.6 and I am running the following sql
command to create triggers
.
CREATE OR REPLACE TRIGGER "MYDB"."TG_T01_01" BEFORE INSERT ON T01
FOR EACH ROW
BEGIN
:NEW.FECALT_01 := SYSDATE;
:NEW.FECMOD_01 := SYSDATE;
SELECT T01Q00.NEXTVAL INTO :NEW.ID_01 FROM DUAL;
END;
/
CREATE OR REPLACE TRIGGER "MYDB"."TG_T01_02"
BEFORE UPDATE ON T01
FOR EACH ROW
BEGIN
:NEW.FECMOD_01 := SYSDATE;
END;
/...
They are a list of identical triggers
of the different tables of the BBDD. When I run the sql
command it shows me these error messages:
14:42:07 [CREATE - 0 rows, 0.032 secs] Command processed. No rows were affected
14:42:07 [:NEW.USUMOD_01 - 0 rows, 0.000 secs] [Code: 17439, SQL State: 99999] Tipo SQL no válido: sqlKind = UNINITIALIZED
14:42:07 [END - 0 rows, 0.000 secs] [Code: 900, SQL State: 42000] ORA-00900: sentencia SQL no válida
14:42:07 [/ - 0 rows, 0.000 secs] [Code: 900, SQL State: 42000] ORA-00900: sentencia SQL no válida
14:42:07 [:NEW.FECMOD_01 - 0 rows, 0.000 secs] [Code: 17439, SQL State: 99999] Tipo SQL no válido: sqlKind = UNINITIALIZED
14:42:07 [:NEW.USUALT_01 - 0 rows, 0.000 secs] [Code: 17439, SQL State: 99999] Tipo SQL no válido: sqlKind = UNINITIALIZED
14:42:07 [:NEW.USUMOD_01 - 0 rows, 0.000 secs] [Code: 17439, SQL State: 99999] Tipo SQL no válido: sqlKind = UNINITIALIZED
14:42:07 [SELECT - 0 rows, 0.000 secs] [Code: 1008, SQL State: 72000] ORA-01008: no todas las variables han sido enlazadas
14:42:07 [END - 0 rows, 0.015 secs] [Code: 900, SQL State: 42000] ORA-00900: sentencia SQL no válida
...
After this a trigger
is created in the following way:
CREATE OR REPLACE TRIGGER "MYDB"."TG_T01_01" BEFORE INSERT ON T01
FOR EACH ROW
BEGIN
:NEW.FECALT_01 := SYSDATE
Note: The trigger
that has been created wrong can be edited and put the code, the trigger
does work and the code is well written, so I have concluded that the most likely is that the sql interpreter of DbVisualizer considers the ;
as an END
.