Home » SQL & PL/SQL » SQL & PL/SQL » https://community.oracle.com/message/14958599#14958599 (Oracle Database 11g Enterprise Edition Release 11.2.0.4.0)
https://community.oracle.com/message/14958599#14958599 [message #672274] Tue, 09 October 2018 15:58 Go to next message
suhaas
Messages: 5
Registered: June 2015
Junior Member
I have a stored procedure where is an Execute Immediate will call a "Begin ... End " block which contains another Execute Immediate which will be called only if a certain condition is met.

The inner Execute Immediate command inside "Begin... End clock" is enclosed in single quotes. So it looks like

BEGIN
...SOME STUFF HERE...

FOR ..... LOOP
EXECUTE IMMEDIATE
'BEGIN
IF (condition) THEN
EXECUTE IMMEDIATE 'DML STRING'
END IF;
END;'

END LOOP;

END;
That begs another question can an Execute Immediate statement be called from within the loop. I think the answer is yes.
Re: https://community.oracle.com/message/14958599#14958599 [message #672275 is a reply to message #672274] Tue, 09 October 2018 16:42 Go to previous message
BlackSwan
Messages: 26201
Registered: January 2009
Location: SoCal
Senior Member
https://community.oracle.com/thread/4177285
Previous Topic: Help required on assigning value to Tabletype variable!
Next Topic: TRIM function
Goto Forum:
  


Current Time: Sat Oct 20 00:20:48 CDT 2018