Below code gives
下面的代码给出
ORA-00933: SQL command not properly ended
ORA-00933:SQL命令未正确结束
on
private final String DUPLICATE_SQL_1="select abc, count(abc)"
+"from table_1"
+"where type= 'NEW'"
+"and trunc(update_date) = trunc(sysdate)"
+"group by abc having count(abc)>1";
ResultSet rs = stmt.executeQuery(DUPLICATE_SQL_1);
Same query worked fine on Oracle SQL Developer.
相同的查询在Oracle SQL Developer上运行良好。
1 个解决方案
#1
You are missing spaces (you must have a space at the end of each line except the last or at the start of each line except the first):
您缺少空格(除了第一行之外,每行末尾除了第一行之外或每行的开头都有空格):
private final String DUPLICATE_SQL_1="select abc, count(abc) "
+"from table_1 "
+"where type= 'NEW' "
+"and trunc(update_date) = trunc(sysdate) "
+"group by abc having count(abc)>1";
#1
You are missing spaces (you must have a space at the end of each line except the last or at the start of each line except the first):
您缺少空格(除了第一行之外,每行末尾除了第一行之外或每行的开头都有空格):
private final String DUPLICATE_SQL_1="select abc, count(abc) "
+"from table_1 "
+"where type= 'NEW' "
+"and trunc(update_date) = trunc(sysdate) "
+"group by abc having count(abc)>1";