Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Parsing SQL-statement before executing?
Depending on what you are trying to achieve you may get some benefit from EXPLAIN PLAN.
Create a publicly visible plan_table, and write a little wrapper which does:
explain plan
set statement_id = '{generated unique identifier}'
for
{the user's SQL}
;
rollback;
EXPLAIN PLAN will parse the statement and derive an execution plan (inserting it into the plan_table) without executing the statement if the statement can be parsed at all.
--
Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk
Magnus Rosenquist wrote in message <7n3s2k$mlm$1_at_vega.lejonet.se>...
>Hi !
>
>Anybody out there who knows if it's possible
>to parse a sql-statement before you execute it?
>
>I'm allowing the users to write their own statements from
>a client, the statement will then be executed in batch so
>any eventual errors will not be displayed until the batch is
>executed.
>
>Is there a way of parsing the statement by using some
>Oracle function and display the outcome to the user?
Received on Thu Jul 22 1999 - 05:16:50 CDT