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 -> Trouble executing data found on TABLE: exe_sel_dttime_xml (COLUMN: QUERY)

Trouble executing data found on TABLE: exe_sel_dttime_xml (COLUMN: QUERY)

From: <nicolas246_at_gmail.com>
Date: 30 Jul 2006 14:43:35 -0700
Message-ID: <1154295815.551623.207600@h48g2000cwc.googlegroups.com>


Hello,

I want to execute using EXECUTE IMMEDIATE the data found on a table exe_sel_dttime_xml

The following code inside a PLSQL procedure constantly gives me coding problems(therefore not working as it should!!):

BEGIN
FOR r
IN (SELECT QUERY INTO v_toexecute FROM exe_sel_dttime_xml) LOOP
EXECUTE IMMEDIATE v_toexecute;
END LOOP;
END;



Basically what this code is supposed to do is execute each of the data found inside the COLUMN: [QUERY] found on the TABLE: [exe_sel_dttime_xml]

ie,

SQL> r
1 select * from exe_sel_dttime_xml
2*

QUERY


SELECT COL_TNAME, DEVICE_DTTIME
INTO table_dttime(COL_TNAME, COL_DTTIME)
FROM t_xml_01;

SELECT COL_TNAME, DEVICE_DTTIME

INTO table_dttime(COL_TNAME, COL_DTTIME) FROM t_xml_02;
SELECT COL_TNAME, DEVICE_DTTIME
INTO table_dttime(COL_TNAME, COL_DTTIME)
FROM t_xml_03;

SELECT COL_TNAME, DEVICE_DTTIME

INTO table_dttime(COL_TNAME, COL_DTTIME) FROM t_xml_04;
SELECT COL_TNAME, DEVICE_DTTIME
INTO table_dttime(COL_TNAME, COL_DTTIME)
FROM t_xml_05;

SELECT COL_TNAME, DEVICE_DTTIME

INTO table_dttime(COL_TNAME, COL_DTTIME) FROM t_xml_06;

Remember,
I need this to work using the following:
+ EXECUTE IMMEDIATE
+ Querying the data from table: exe_sel_dttime_xml

(ie, SELECT QUERY INTO v_toexecute FROM exe_sel_dttime_xml)

All (and any) help is appreciated
-ng Received on Sun Jul 30 2006 - 16:43:35 CDT

Original text of this message

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