1

Topic: Dinamic DDL: ORA-14006 an incorrect name of section

Good afternoon!
The script is fulfilled in sql navigator 6.7.0.
Basis oracle 11.2.0.4
DECLARE
dd VARCHAR2 (100);
BEGIN
FOR part IN ( SELECT partition_name
FROM all_tab_partitions
WHERE table_name LIKE ' TRACE_LOG ' AND partition_name
IN (' SYS_P20731 ', ' SYS_P20751 ', ' SYS_P20771 '))
LOOP
dd: = part.partition_name;
EXECUTE IMMEDIATE ' ALTER TABLE TRACE_LOG DROP PARTITION:d ' using dd;
END LOOP ;
END ;
Error: ORA-14006: an incorrect name of section
DBMS_OUTPUT.put_line (' ALTER TABLE trc_log DROP PARTITION ' || dd) deduces the following (I result only one line):
ALTER TABLE TRACE_LOG DROP PARTITION SYS_P20771
Like all it is correct. Prompt in what there can be an error

2

Re: Dinamic DDL: ORA-14006 an incorrect name of section

STFF DDL bind

3

Re: Dinamic DDL: ORA-14006 an incorrect name of section

Elic, Thanks!
This case from sampling http://www.sql.ru/forum/1291238/execute … ber?hl=ddl bind helped here
By analogy made a line
EXECUTE IMMEDIATE ' ALTER TABLE TRACE_LOG DROP PARTITION ' || dd;
Worked)