Oracle Triggers in Data Source view

I am having a problem running some ddl to create my schema in Oracle. When I execute the following sql, the term ":new.JOB_NUM" shows up in the Parameters list on the lower right hand side of the Database Console window.

CREATE TABLE JOB
(
    JOB_ID VARCHAR2(36) NOT NULL,
    JOB_NUM INTEGER NOT NULL
)

CREATE SEQUENCE seq_JOB_JOB_NUM;

CREATE OR REPLACE TRIGGER trg_JOB_JOB_NUM BEFORE INSERT ON JOB FOR EACH ROW WHEN (new.JOB_NUM IS NULL)
BEGIN SELECT seq_JOB_JOB_NUM.nextval INTO :new.JOB_NUM FROM dual; END;

When I attempt to execute this sql, a dialog pops up asking me to "Please Provide Missing Values...". I have tried putting a random value in there, and it gives me an error stating that the SQL is not valid. To get this working I had to put the value ":new.JOB_NUM" into the box so it, in effect, replaced the value with itself. Perhaps I missed it, but I couldn't find anything in the docs about this behavior. Thanks!

Rick

1 comment
Comment actions Permalink

Hi Rick

You posted to a forum on TeamCity continuous integration server.
Was it a question on some of JetBrains IDEs?

0

Please sign in to leave a comment.