I have a variable defined like variable my_var clob; Then, in the pl/sql block I have another clob variable, x. At the end of the block, I have :my_var := x;
Then after the block, I start to spool into a file some ommands. That "x" variable contains multiple select statements. I have:
SPOOL ..... PROMPT SELECT .... from .... PROMPT /
PROMPT :my_var PROMPT /
But this doesn't work. So I need in my final file to have a list of sql commands. The first is specified in clear with that PROMPT, but after I want to have all the SELECT statements in the file, which are contained in the variable :my_Var. How can I spool the content of :my_Var into the file?
Thanks!