R
rblanchard
Guest
I am attempting to use CREATE TRIGGER in the SQL Editor according to OE Data Management SQL Development doc. the following code will not run. It returns a syntax error in SQL statement at or about END (10713). Does anyone have any ideas? CREATE TRIGGER Pub.nitroasl_mailer_trigger BEFORE INSERT ON Pub.nitroasl_mailer REFERENCING NEWROW FOR EACH ROW IMPORT import java.sql.* ; BEGIN Long current_id = (Long)NEWROW.getValue(1, BIGINT); if (current_id = 1) { SQLCursor next_id_query = new SQLCursor("SELECT TOP 1 Pub.nitroasl_mailer_seq.NEXTVAL FROM SYSPROGRESS.SYSCALCTABLE"); next_id_query.open(); next_id_query.fetch(); Long next_id = (Long)next_id_query.getValue(1,BIGINT); next_id_query.close(); NEWROW.setValue(1, next_id); } END
Continue reading...
Continue reading...