Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: What is wrong with this trigger definition?

Re: What is wrong with this trigger definition?

From: Carlos <miotromailcarlos_at_netscape.net>
Date: 22 Jun 2006 05:11:38 -0700
Message-ID: <1150978298.621544.320810@m73g2000cwd.googlegroups.com>


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

>...

> SELECT key_col INTO target_value
> FROM :new.TableName
> WHERE key_col = :new.Target;
> END;
> ...
> /

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US