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 | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 23#253015906

    GitHub | 7 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