Oracle "ORA-00911: invalid character" solution

ORA-00911 encountered at work: Invalid character of the problem,

code show as below:

<select id="querySendMsg" parameterType="map" resultMap="sendMsgResult">
        select t.employee_code,t.phone_no,t.wechat_id,t.employee_name,t.send_msg,t.send_time from itsc_msg_abnormal_record t
        where t.orderNo in
        <foreach item="item" index="index" collection="orderNoList" open="(" separator="," close=")">
        #{item}
        </foreach>;
</select>

Error as follows:

### The error occurred while setting parameters
### SQL: select t.* from itsc_msg_abnormal_record t where t.orderNo in ( ? , ? ) ;
### Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符

; Bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00911: invalid character

At the end of the select statement is found to pay more a semicolon ';'

Can be removed

Guess you like

Origin www.cnblogs.com/MrZhaoyx/p/11804652.html