sqlparser / gsp_demo_java

Java demos for the General SQL Parser library
127 stars 68 forks source link

TGSqlParser.parse can not parse trigger when use syntax :NEW and :OLD #19

Open 1987jy opened 2 years ago

1987jy commented 2 years ago

TGSqlParser.parse can not parse trigger when use syntax :NEW and :OLD

this is oracle help doc about :NEW and :OLD https://docs.oracle.com/database/121/TDDDG/tdddg_triggers.htm#TDDDG52800

CREATE OR REPLACE TRIGGER update_name_view_trigger INSTEAD OF UPDATE ON emp_locations BEGIN UPDATE employees SET first_name = substr( :NEW.name, instr( :new.name, ',' )+2), last_name = substr( :NEW.name, 1, instr( :new.name, ',')-1) WHERE employee_id = :OLD.employee_id; END;

TGSqlParser.parse return Error when tokenlize when parse :NEW and :OLD