Dave Anderson wrote:
>
> Thanks everyone - I guess I could have guessed that.
>
> One further question, you can do PL/SQL through dbi (I think), so, is
> the semi colon needed for PL/SQL?
Further to this, the reason I ask is that
$sth = $dbh->prepare("CREATE OR REPLACE TRIGGER ADDRESS_ID_TRIG
BEFORE INSERT
ON ADDRESS
FOR EACH ROW
BEGIN
SELECT ADDRESS_SEQ.NEXTVAL
INTO :NEW.ADDRESS_ID
FROM DUAL;
END;");
Seems to create a valid trigger that works. Whereas taking the semi
colons out of the above, gives me no error messages, but when I do an
insert on table, I get
ORA-04098: trigger 'DAVE.ADDRESS_ID_TRIG' is invalid and failed
re-validation
thanks
Dave