error of bad bind variable [message #2150] |
Mon, 24 June 2002 23:42 |
keane
Messages: 23 Registered: June 2002
|
Junior Member |
|
|
Hi, I try to assign one column name to a variable and use this variable to retrieve the value, but failed.
the original code is
create or replace trigger test is
after insert on rel1
for each row
declare
column_name varchar2(20);
begin
column_name := 'col1'; -- col1 is one column of rel1
dbms_output.put_line(:new.column_name);
end;
The error is bad bind variable, :new.column_name. I don't want to use :new.col1 directly because I want to get a general form. So can anyone help me? thanks a lot.
Regards,
keane
|
|
|
|