in reply to Re^3: Error in query with DBD-SQLite-1.37 - Aggregate functions are not allowed in the GROUP BY clause.
in thread Error in query with DBD-SQLite-1.37 - Aggregate functions are not allowed in the GROUP BY clause.

Can u please help me in troubleshooting why DBD-SQlite is unable to detect the the current SQLITE version? The strange thing is that the same query with GROUP BY is running fine with DBI but not on command line.
  • Comment on Re^4: Error in query with DBD-SQLite-1.37 - Aggregate functions are not allowed in the GROUP BY clause.

Replies are listed 'Best First'.
Re^5: Error in query with DBD-SQLite-1.37 - Aggregate functions are not allowed in the GROUP BY clause.
by Corion (Patriarch) on Jul 30, 2012 at 12:38 UTC

    The following will give you the module version:

    perl -MDBD::SQLite -e 'print $DBD::SQLite->VERSION'

    The following will give you the SQLite version:

    perl -MDBI -e "print DBI->connect('dbi:SQLite:dbname=:memory:')->{sqli +te_version}´"
Re^5: Error in query with DBD-SQLite-1.37 - Aggregate functions are not allowed in the GROUP BY clause.
by roboticus (Chancellor) on Jul 30, 2012 at 12:56 UTC

    saumitra121:

    As I understand it, when you install DBD::SQLite, it builds into itself a version of SQLite. So if you change versions of DBD::SQLite, you likely have a different version of SQLite as well. If SQLite added some features and changed how it parses statements, then that could explain why it worked in a different version of DBD::SQLite. Try reading the release notes and list of changes of both DBD::SQLite versions to find the versions of SQLite used, then review the SQLite docs and see what changed between those versions. Digging around on an SQLite support group might yield some answers...

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.