Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Trouble executing data found on TABLE: exe_sel_dttime_xml (COLUMN: QUERY)
fitzjarrell_at_cox.net wrote:
> Comments embedded.
> nicolas246_at_gmail.com wrote:
>> 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;
> What, exactly, is r? It appears to be a senselessly declared variable
> of absolutely no use whatsoever.
Let me reformat the original:
BEGIN
FOR r IN (SELECT QUERY INTO v_toexecute FROM exe_sel_dttime_xml)
LOOP
EXECUTE IMMEDIATE v_toexecute;
END LOOP;
END;
/
Looks like a perfectly good cursor FOR loop to me though the rest of what is being done looks rather odd.
The OP claims to "need" NDS but I don't see any reason for it from the posted example. Seems to me that if the OP wants any help a lot more information is required.
To the OP:
1. What version of Oracle?
2. Look at the working demo in Morgan's Library at www.psoug.org
on array processing the shows how to use it with NDS. Cursor loops are very inefficient and should be avoided if possible.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Mon Jul 31 2006 - 10:34:26 CDT
![]() |
![]() |