Oracle SQL Parser

I have been looking for a decent Oracle SQL parser.
I found JDeveloper eSDK by Oracle, which apparently includes a parser/generator for Oracle SQL.

It is poorly documented, only JavaDoc is available.
The JavaDoc is here, the main packages involved are oracle.javatools.db and oracle.javatools.db.sql.

However, after some days of playing with it, I found serious deficiencies:

  1. Poor documentation, support close to none, only a forum where no one will answer your questions, even bug.
  2. Can’t parse WITH clause. Workaround none.
  3. Eat away keyword distinct in the select list. Workaround, use group by for some cases.
  4. Eat away package name, eg, foo.bar, parsed as bar. Workaround, have a public synonym for foo.bar
  5. Can’t parse IN clause with subquery. Workaround, rewrite with equijoin, potential performance impact

I am wondering if you know some decent Oracle SQL parser, perferrably written in Java.

Advertisements

One Response to “Oracle SQL Parser”

  1. Emre Akarsu Says:

    Can you share some sample code that you developed so far ? It is really hard to find a sample code.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: