Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Trouble executing data found on TABLE: exe_sel_dttime_xml (COLUMN: QUERY)
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;
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
SELECT COL_TNAME, DEVICE_DTTIME INTO table_dttime(COL_TNAME, COL_DTTIME) FROM t_xml_03; SELECT COL_TNAME, DEVICE_DTTIME
SELECT COL_TNAME, DEVICE_DTTIME INTO table_dttime(COL_TNAME, COL_DTTIME) FROM t_xml_05; SELECT COL_TNAME, DEVICE_DTTIME
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