Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Dynamic tables in PL/SQL proc

Dynamic tables in PL/SQL proc

From: <arivlin_at_my-dejanews.com>
Date: Fri, 05 Mar 1999 19:18:33 GMT
Message-ID: <7bpalu$6ch$1@nnrp1.dejanews.com>


I need help creating dynamic table within PL/SQL proc.

Procedure replases data in table using delete and 5 "insert into ... select..." statements. If one of "insert into ... select" fails, I want to keep original data in destination table. For that I need a temporary table, created on-fly, to make sure all 5 statements run OK. how can I create table inside PL sql proc with a name TEMP_TABLE_FRI_3_5_1999_11_07_23_234_Arivlin where stuff after TEMP_TABLE is timestamp and user name?

I can build a char variable Table_Name = 'TEMP_TABLE' || to_char ( sysdate... ) || user. how can I form a create table statement?

To make things worse, there is no front end where I can prepare SQL. Thank you in advance
Alex

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Mar 05 1999 - 13:18:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US