Answer the question
In order to leave comments, you need to log in
When working with dynamic SQL error invalid identifier, how can I fix it?
All hello guys!
Can you help in solving the problem (I need to update certain data in the 'tablename' table, the data that is taken from general_table )
declare
tablename varchar(255) := 'CoolTable';
BEGIN
select functable (tablename) into tablename from dual; --возвращает наличие таблицы
for rec in (select g.acode, g.clcode from general_table g where rownum = 1) loop
if tablename is not null then
execute immediate 'update ' || tablename || ' set accli = ' || rec.acode || ', clcode= ' || rec.clcode || ''; --данные из таблы general_table обновляются в таблице tablename
end if;
end loop;
end;
ORA-00904: "8989123123": недопустимый идентификатор
ORA-06512: на line 16
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question