Now I am passing an monthstring (1,2, 3) to the query
StringBuffer query = new StringBuffer("SELECT SUM(AAAAA), SUM(DDDDDDD) ");
query.append(" FROM "+Constants.emp+" WHERE CAT
='").append(category).append("' AND YEAR(DATE)=").append(year);
query.append(" AND MONTH(DATE)IN").append("(").append(monthStr).append(")");
query.append(" AND MONTH(DATE)IN").append("(").append(monthStr).append(")");// I got the mql syntax error at for monthstr
java.sql.SQLException: Syntax error or access violation: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1,2,3)' at line 1
what was the wrong in the above query. Please let me know