JSP运行出错Multiple annotations found at this line: 5

<%Stringyear=request.getParameter("year");//获得某年按月份分组的总销售额的SQL语句StringstrSql="select*... <%
String year=request.getParameter("year");
//获得某年按月份分组的总销售额的SQL语句
String strSql="select * from (select sum(je) as sumje,month(xsdate) as xsmonth from tb_sell where year(xsdate)='"+
year+"' group by month(xsdate) union select 0,MonthName from GetMonth() where MonthName not in (select month(xsdate) as xsmonth from tb_sell where year(xsdate)='"+
year+"' group by month(xsdate))) temp order by temp.xsmonth";
ResultSet rs=rst.getResult(strSql);//此处出错入下:【】
【//Multiple annotations found at this line:
//- The type java.lang.CharSequence cannot be resolved. It is indirectly
//referenced from required .class files
//- The type java.lang.CharSequence cannot be resolved. It is indirectly
//referenced from required .class files】
int counts=0;
if(!rs.next()){
out.println("<script language='javascript'>alert('"+year+"年没有销售记录');"+
"window.location.href='main.jsp';</script>");
}
展开
 我来答
千叶育儿
2014-12-03 · 育儿、诗词分享,每天进步一点点!
千叶育儿
采纳数:1524 获赞数:5378

向TA提问 私信TA
展开全部
你union的两个select语句里的字段要一致,就是后面的select 0,MonthName也要select 0 as sumje,MonthName as xsmonth
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式