ORA-00911 无效字符错误解决方法

在orcale里执行的上去了语句:

select hit.id,u.username,axis.axisname,coor.coordinatename,a.cnt,hit.adddate from t_coordinate_hitlog hit join t_coordinate coor on hit.coordinateid = coor.id join t_axis axis on hit.moduleid = axis.id join t_adminuser u on hit.userid = u.id join (select hit.coordinateid,count(*) as cnt from t_coordinate_hitlog hit group by  hit.coordinateid) a on a.coordinateid=hit.coordinateid order by hit.id;

然后直接全部复制到String sql的变量里:

String sql = "select hit.id,u.username,axis.axisname,coor.coordinatename,a.cnt,hit.adddate " +
				"from t_coordinate_hitlog hit join t_coordinate coor " +
				"on hit.coordinateid = coor.id join t_axis axis on hit.moduleid = axis.id " +
				"join t_adminuser u on hit.userid = u.id join (select hit.coordinateid,count(*) as cnt " +
				"from t_coordinate_hitlog hit group by  hit.coordinateid) a on " +
				"a.coordinateid=hit.coordinateid order by hit.id;";

然后程序就报:ORA-00911 无效字符错误解决方法  


解决办法:去掉;

你可能感兴趣的:(Java,SQL,Server,Orcale)