Menu

Problem with count function.

2007-04-18
2012-12-07
  • Nobody/Anonymous

    Hi all

    I want to parse the below query .but i am getting an exception

    "Select  count(distinct  id)  from AB"

    StackTrace is given below

    net.sf.jsqlparser.JSQLParserException
        at net.sf.jsqlparser.parser.CCJSqlParserManager.parse(CCJSqlParserManager.java:40)
        at net.sf.jsqlparser.test.mytest.Mypareser.parse(Mypareser.java:118)
        at net.sf.jsqlparser.test.mytest.Mypareser.main(Mypareser.java:110)
    Caused by: net.sf.jsqlparser.parser.ParseException: Encountered "( distinct" at line 1, column 14.

    Can anyone help me to solve this??

    Thanks in advance
    Gokul

     
    • Leonardo Francalanci

      I'll look at that

       
  • Nobody/Anonymous

    I have the same problem:

    "Select  count(distinct  id)  from AB"

    JSQLParser tells me that this query is wrong, and it doesn't…

     
  • Leonardo Francalanci

    I'll upload version 0.6.4, which should solve the problem

     

Log in to post a comment.