...but I'm trying to do this via a script.

The code:

create or replace trigger resource_key before insert on resources
for each row 
begin
select resource_id_seq.nextval into :new.resource_id from dual;
end;

Works in sqlplus, but does not when executed via dbi or via jdbc.

What I end up with instead is the code in the trigger:

create or replace trigger resource_key before insert on resources
for each row 
begin
select resource_id_seq.nextval into :new.resource_id from dual

And an error about an invalid sql command for the 'end;' bit.

How do I make this work within dbi?


-- 
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs


Reply via email to