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

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

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 31 Jul 2006 08:34:26 -0700
Message-ID: <1154360067.501100@bubbleator.drizzle.com>


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

>
> And it isn't doing what you want, or it isn't doing what you expect?
> There is a difference.
>
>> The following code inside a PLSQL procedure constantly gives me coding
>> problems(therefore not working as it should!!):
>>

>
> Define 'coding problems'; my crystal ball has been in disrepair for
> years.
>
>> 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.org
Received on Mon Jul 31 2006 - 10:34:26 CDT

Original text of this message

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