Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

why this error ORA-00904: invalid identifier

AyhamAug 29 2012 — edited Aug 29 2012
Hi all,
Please advice me what is wronge with this
ORA-00904: "NONE": invalid identifier


create or replace trigger test_table2
before insert
on Ta
for each row
declare
v2_none_con varchar2(20);
v2_none_con2 varchar2(20);
i number(10);
TYPE v2_EmpCurTyp IS REF CURSOR;
v2_emp_cursor v2_EmpCurTyp;
v2_stmt_str VARCHAR2(200);
TYPE v2_employee_type IS RECORD ( v_rowid varchar(100));
v2_emp_content v2_employee_type;
begin

v2_none_con2:='NONE';

v2_stmt_str := 'select rowid from t1 where name='v2_none_con2;
i:=0;
OPEN v2_emp_cursor FOR v2_stmt_str ;
LOOP FETCH v2_emp_cursor INTO v2_emp_content;
EXIT WHEN v2_emp_cursor%NOTFOUND;
dbms_output.put_line(v2_emp_content.v_rowid);
i:=i+1;
v2_none_con:='NON'||to_char(i);

END LOOP;
end;




SQL> /
insert into ta values(10,' Wael')
*
ERROR at line 1:
ORA-00904: "NONE": invalid identifier
ORA-06512: at "FINAL.TEST_TABLE2", line 15
ORA-04088: error during execution of trigger 'FINAL.TEST_TABLE2'


SQL>
This post has been answered by Solomon Yakobson on Aug 29 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 26 2012
Added on Aug 29 2012
4 comments
1,166 views