|
-
select (max(cdr_id)+1) into v_sql_text from cdr_'|| to_char(sysdate,'YYYYMMDD') ||';
. . . is exactly what you CAN'T do without Dynamic SQL = Execute Immediate. You need dynamic SQL when:
- you want to make the names of any objects variable.
- you want to execute DDL in PL/SQL.
If you want to work directly with the external table, you will have to construct ALL your SQL the way I suggested to construct the INSERT statement. This is why I suggested to limit the name dependant logic to one staement by dumping everything into a table with a fixed name.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|