18 thoughts on “EXECUTE IMMEDIATE ‘SELECT’ does not execute anything”

Laurent,
Thanks for the great website and all the good articles. I have an 8.1.7.4 and 9.2.0.8, hp-ux instances handy and ran the test on both. The same issue exists back to 8i. The SID of the connection names will show the versions.

Normally you would see a PARSE, EXEC followed by a FETCH operation. However, since you do not provide any INTO clause in the first example Oracle is not performing the fetch operation. If you notice cursor #255700156 is still open at the end of the trace file.

Oracle connects perfectly well to the output grid in Toad (or other display channels in other tools). but becomes ugly and stupid when an anonymous block is created with a begin and end statement. Now, the common need to interactively debug a nascent procedural query requires extra time to (1) create an output channel with a declared type, (2) direct the select result to that channel using “bulk collect into”, then (3) somehow connect that channel to the output grid. All three steps are at the “guru” level of complexity. Please, can one or more of the people with those skills give some examples for the three steps, especially the third?