Re: question about SQL Parser
- From: jeff@xxxxxxxxxxxxxx (Jeff Zucker)
- Date: Mon, 25 Jun 2007 08:57:08 -0700
Hi,
Felipe Maribel wrote:
I have installed this application to parse SQL queries, but it doesn'tThe parser currently won't break on foo.bar syntax but (if I'm remembering correctly) can't handle foo.bar.baz, that wouldn't be too hard to add.
work with the query I try to, it is to say, the parser doesn't match the
query I send it. That is because my query has sentences like
'mydb.dbo.mytable'
or "case when" in SELECT clause, etc. Besides theSorry, the parser does not handle CASE statements and they would not be easy to add (though patches and collaborators are always welcome).
queries I want to parse don't have always the reserved words in capitalIdentifier case is insensitive - in other words it doesn't matter if the reserved words are in capital letters.
letters.
For Data Definition Language (DDL), you should check out SQL::Translator, it is much more complete for DDL. It doesn't, at least the last time I checked, handle Data Modification.
At the moment your best option may be wrapping the parsing in an eval and creating two output files - one of successfully parsed statements and one of statements that couldn't be parsed. (Though depending on what you are trying to do, this may not be useful)
You may also want to look at some non-Perl SQL parsers such as the one by Mimer. Sorry I can't be more helpful, good luck.
--
Jeff
P.S. Since this isn't strictly DBI, perhaps you should send your reply to me directly.
.
- References:
- question about SQL Parser
- From: Felipe Maribel
- question about SQL Parser
- Prev by Date: Re: Help requested : Compile/build requirements for DBI - 1.37 and DBD-Oracle- 1.14 - Double message
- Next by Date: Is there a "Universal" access module?
- Previous by thread: question about SQL Parser
- Next by thread: Re: Help requested : Compile/build requirements for DBI - 1.37 and DBD-Oracle- 1.14 - Double message
- Index(es):
Relevant Pages
|
|