bad binding error on after insert trigger! [message #201363] |
Fri, 03 November 2006 13:31 |
triggerwf
Messages: 2 Registered: November 2006
|
Junior Member |
|
|
CREATE OR REPLACE TRIGGER CMPL_DEV.AFTER_INSERT_T_CI_SECURITY
AFTER INSERT
ON CMPL_DEV.T_CI_SECURITY
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
-- INSERT VALUES IN THE CHILD TABLE T_CI_SECURITYLOG.
INSERT INTO T_CI_SECURITY_LOG (LOG_KEY, LOG_TABLE_ID, LOG_ACTION, LOG_ACTION_BY, LOG_ACTION_DATE,SECURITY_KEY,CI_KEY,CREATED_BY,CREATED_DATE,UPDATED_BY,UPDATED_DATE,SECURITY_DESCRIPTION,SECURITY_SYMBOL)
VALUES(SECURITY_KEY_SEQ.NEXTVAL, 'SECURITY', 'Added',:NEW.CREATED_BY, :NEW.CREATED_DATE,:NEW.SECURITY_KEY,:NEW.CI_KEY,:NEW.CREATED_BY,:NEW.CREATED_DATE,:NEW.UPDATED_BY,:NEW.UPDATED_DATE,:NEW.SECURITY_DES CRIPTION,:NEW.SECURITY_SYMBOL);
END;
/
i get bad bind error on
PLS-00049: bad bind variable for 'NEW.CREATED_BY',NEW.CREATED_DATE, and NEW.CREATED_BY,:NEW.CREATED_DATE,:NEW.UPDATED_BY,:NEW.UPDATED_DATE,:
I have spellchecked the column names, the columns are there in the table t_ci_security_log.
Thankyou in advance for you time and help for looking into this.
|
|
|
|
|
Re: bad binding error on after insert trigger! [message #201370 is a reply to message #201369] |
Fri, 03 November 2006 14:35 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
In that case, you'll have to decide what to do. Obviously, you can not insert something you don't have.
As you didn't post tables' descriptions, it is kind of difficult to suggest or even guess how to do it. DATE columns *might* be a SYSDATE, for example; CREATED_BY *could* be USER. But, again, it is you who should know what to insert where.
|
|
|