I am working with MyBatis and Informix DB. In my DB client the SQL works just fine. When I call the method in my program, there is an SQL syntax error.
<insert id="insertDataArchive">
INSERT INTO dat_arch(id,code,dom,change_type,start_date,end_date)
SELECT (id,code,dom,#{changeType}, #{startDate}, #{endDate})
FROM data_store
WHERE id = #{id}
</insert>
The error messages I get are:
Error updating database. Cause: java.sql.SQLSyntaxErrorException: A syntax error has occurred.
Cause: java.sql.SQLSyntaxErrorException: A syntax error has occurred.
There is no detail info, just these two messages.