Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » BadParseException in mysql db(BadParseException in mysql db)
BadParseException in mysql db [message #669724] Wed, 11 May 2011 09:34
Woo  is currently offline Woo Friend
Messages: 3
Registered: August 2010
Junior Member
I want to parse mysql sql content using dtp sql parser.
I don't know invoking(or creating) mysql dialect sql parser, I invoked generic sql parser and parse sql content
so it occured BadParseException.

String sql = "select max(cast(emp_no as unsigned)) from emp limit 5"; // error issue is 'limit 5'
SQLQueryParserManager parserManager = SQLQueryParserManagerProvider.getInstance().getParserManager (null, null); // <- mysql, version 5
SQLQueryParseResult queryParseResult = parserManager.parseQuery(sql);

org.eclipse.datatools.sqltools.parsers.sql.SQLParserExceptio n: Unable to parse the input: "select max(cast(emp_no as unsigned)) from emp limit 5;".
at org.eclipse.datatools.sqltools.parsers.sql.AbstractSQLParser .parser(
at org.eclipse.datatools.sqltools.parsers.sql.SQLParserManager. makeAST(
at org.eclipse.datatools.sqltools.parsers.sql.SQLParserManager. parse(
at org.eclipse.datatools.sqltools.parsers.sql.query.SQLQueryPar serManager.parseQuery(
Caused by: lpg.lpgjavaruntime.BadParseException
at lpg.lpgjavaruntime.BacktrackingParser.parse(BacktrackingPars
at lpg.lpgjavaruntime.BacktrackingParser.parse(BacktrackingPars
at org.eclipse.datatools.sqltools.parsers.sql.AbstractSQLParser .parser(
... 32 more

Parsing target db is mysql, version is 5.0
How to invoking(or create) mysql dialect sql parser, is there plugins or jar file needed
Previous Topic:Can't browse schemas
Next Topic:Sybase "create procedure" scripts
Goto Forum:

Current Time: Tue Jan 26 00:40:55 GMT 2021

Powered by FUDForum. Page generated in 0.02173 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top