Thanks for the tip. As it turns out, my real problem was that I am supplying bind parameters to the EXPLAIN PLAN statement. Either form of placeholder (? or :XXX) will work in a EXPLAIN PLAN statement, but you do not want to pass any bind parameters when executing the statement.
Thanks again to everyone for their help. ER On Mon, Apr 20, 2009 at 5:36 PM, Tim Bunce <[email protected]> wrote: > On Mon, Apr 20, 2009 at 04:56:12PM -0500, E R wrote: >> I've got tons of sql that uses ? placeholders. >> >> Is there a way to accurately determine which question marks represent >> placeholders and which ones don't? >> >> For instance: >> >> SELECT LENGTH('?') FROM DUAL; >> v.s. >> SELECT LENGTH(?) FROM DUAL; > > Assuming your database and driver don't offer anything specific, > you might find the DBI's (undocumented) preparse() method useful. > The only docs are the tests: > > http://cpansearch.perl.org/src/TIMB/DBI-1.607/t/60preparse.t > > Tim. > > p.s. undocumented, unsupported, liable to change yada yada yada >
