本地数据库好用,部署到其他环境sql报错
Cause: dm.jdbc.driver.DMException: Error in line: 1\nThe select item is not the item of group by\n; Error in line: 1\nThe select item is not the item of group by; nested exception is dm.jdbc.driver.DMException: Error in line: 1\nThe select item is not the item of group by","data":null
SELECT COUNT(*) FROM (SELECT a.id, a.periods, a.periods_total, a.reporting_time, a.publication_name, a.state, a.create_type, b.event_id, wm_concat(DISTINCT sensitive) sensitive, wm_concat(DISTINCT sensitive_code) sensitive_code, wm_concat(DISTINCT event_type_name) event_type_name, wm_concat(DISTINCT event_type_full) event_type_full, wm_concat(DISTINCT event_grade) event_grade, wm_concat(DISTINCT event_grade_name) event_grade_name, CASE WHEN d.create_user = ? THEN wm_concat(DISTINCT label_id) ELSE '' END label_id, CASE WHEN e.create_user = ? THEN wm_concat(DISTINCT label_name) ELSE '' END label_name FROM ZBZS_PUBLICATION a LEFT JOIN ZBZS_PUBLICATION_EVENT b ON a.id = b.publication_id LEFT JOIN ZBZS_EVENT_INFO c ON c.id = b.event_id LEFT JOIN ZBZS_PUBLICATION_LABEL_RELATION d ON a.id = d.publication_id LEFT JOIN ZBZS_PUBLICATION_LABEL e ON e.id = d.label_id WHERE 1 = 1 AND a.publication_template = ? AND a.state = ? GROUP BY a.id ORDER BY a.create_time DESC) TOTAL
“The select item is not the item of group by”
修改下参数试试:
然后重启应用程序试试