BatchUpdateException ORA-00933: SQL command not properly ended with Honeysql and oracle

145 views Asked by At

I am getting a BatchUpdateException for the following clojure/HoneySql code

(def valmaparr [{:col_1 1,
  :col_2 "r5-0393OPE102FLe",
  :col_3 "PASSED"}
 {:col_1 1,
  :col_2 "r5-04vEGEGsHOrv6",
  :col_3 "PASSED"}])


(defn insert-into-table [valmaparr]
  (-> (insert-into  :some-table)
      (values valmaparr)
      (sql/format)      
      ))

the above code produces the query

["INSERT INTO some-table (col_1, col_2, col_3) VALUES (?, ?, ?), (?, ?, ?)"
 1
 "val1"
 "PASSED"
 1
 "val2"
 "PASSED"]

however when I execute the query

I get the exception

BatchUpdateException ORA-00933: SQL command not properly ended
  oracle.jdbc.driver.OraclePreparedStatement.executeBatch (OraclePreparedStatement.java:10500)
0

There are 0 answers