Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Parsing SQL Statement
Is there an easy way to extract the different parts of an SQL statement (SELECT, FROM, WHERE), in order to determine the columns being used, tables being accessed and columns being used in the where clause?
For simple SQL that has only one of the above clauses, may be simple (using substr, instr etc.), but it gets complicated with inline views, sub-queries etc.
Would "Oracle Text" be of any significance here in order to do the parsing?
The idea is to use database auditing (using db,extended ) that would capture the SQL statement, but we could then parse the SQLs to see the column-access usage, table accessed in the SQL and the colums used in the where condition (this may also be present already in sys.column_usage, but I'm not sure).
Thanks,
Deepak
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Mar 21 2007 - 09:48:38 CDT
![]() |
![]() |