org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [select distinct concat(year(date), ' - ', quarter(date)) from rfwl_notices order by date]; SQL state [HY000]; error code [3065]; Expression #1 of ORDER BY clause is not in SELECT list, references column 'rf.rfwl_notices.date' which is not in SELECT list; this is incompatible with DISTINCT; nested exception is java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'rf.rfwl_notices.date' which is not in SELECT list; this is incompatible with DISTINCT] with root cause java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'rf.rfwl_notices.date' which is not in SELECT list; this is incompatible with DISTINCT

GitHub | KrzysztofMadejski | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    GitHub comment 23#253015906

    GitHub | 6 months ago | KrzysztofMadejski
    org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [select distinct concat(year(date), ' - ', quarter(date)) from rfwl_notices order by date]; SQL state [HY000]; error code [3065]; Expression #1 of ORDER BY clause is not in SELECT list, references column 'rf.rfwl_notices.date' which is not in SELECT list; this is incompatible with DISTINCT; nested exception is java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'rf.rfwl_notices.date' which is not in SELECT list; this is incompatible with DISTINCT] with root cause java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'rf.rfwl_notices.date' which is not in SELECT list; this is incompatible with DISTINCT

    Root Cause Analysis

    1. org.springframework.jdbc.UncategorizedSQLException

      StatementCallback; uncategorized SQLException for SQL [select distinct concat(year(date), ' - ', quarter(date)) from rfwl_notices order by date]; SQL state [HY000]; error code [3065]; Expression #1 of ORDER BY clause is not in SELECT list, references column 'rf.rfwl_notices.date' which is not in SELECT list; this is incompatible with DISTINCT; nested exception is java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'rf.rfwl_notices.date' which is not in SELECT list; this is incompatible with DISTINCT] with root cause java.sql.SQLException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'rf.rfwl_notices.date' which is not in SELECT list; this is incompatible with DISTINCT

      at com.mysql.jdbc.SQLError.createSQLException()
    2. MySQL jdbc
      SQLError.createSQLException
      1. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963)[mysql-connector-java-5.1.39.jar!/:5.1.39]
      1 frame