Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What is wrong with this trigger definition?
Benjamin Hell wrote:
> Hello!
> ...
> LINE/COL ERROR
> -------- -------------------------------------------
> 9/9 PL/SQL: SQL Statement ignored
> 11/13 PL/SQL: ORA-00903: invalid table name
> ...
> CREATE OR REPLACE TRIGGER trig_check_mapping_target
>...> END;
> SELECT key_col INTO target_value
> FROM :new.TableName
> WHERE key_col = :new.Target;
You cannot do that. It won't compile. (It seems that you are trying to do some DYNAMIC SQL... and in a wrong way).
Re-think the logic.
HTH. Cheers.
Carlos. Received on Thu Jun 22 2006 - 07:11:38 CDT