Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with trigger compilation errors
tim.mcconechy_at_runtime.dk wrote in article
<7ed3i4$t7c$1_at_nnrp1.dejanews.com>...
: This code usually works fine: CREATE OR REPLACE TRIGGER
pdmlog_audit_info
: BEFORE INSERT OR UPDATE ON "PDMLOG" FOR EACH ROW BEGIN IF
INSERTING THEN
: :new.user_name := user; :new.lastedit := sysdate; ELSIF UPDATING
THEN
: :new.user_name := user; :new.lastedit := sysdate; END IF; END; /
ERROR at
: line 2: ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553:
: PLS-320: the declaration of the type of this expression is incomplete
or
: malformed
:
^^^^^
IMHO, one mustn't use Oracle reserved words for any own purposes. Truly
speaking, the PL/SQL reaction for this seems a bit weird, but c'est la
vie - rename column
DATA, and the mistake'll disappear.
You use other reserved words - TYPE and USER for column
names, it can cause somewhere something sometimes too.
And USER function returns VARCHAR2, and the column
USER_NAME is number(2). The trigger in any case can't
outlive more than 100 users, speaking nothing of DBA
who gives users the names his left heel wants.
Received on Wed Apr 07 1999 - 13:49:12 CDT