Closed dfrese closed 10 months ago
An insert_all with a query of the data to be inserted, which has a 'CTE', generates an SQL string like
insert_all
sql INSERT INTO foo (WITH bar AS ...)
which gives me an Oracle error
ORA-32034: unsupported use of WITH clause
Removing the braces around the WITH works, which can be achieved by changing the insert_all clause in jamdb_oracle_query.ex to:
jamdb_oracle_query.ex
defp insert_all(query = %Ecto.Query{}, _counter) do [all(query)] end
(cte_query in line 253 adds braces too, but that didn't seem relevant here)
cte_query
fix
An
insert_all
with a query of the data to be inserted, which has a 'CTE', generates an SQL string likesql INSERT INTO foo (WITH bar AS ...)
which gives me an Oracle error
ORA-32034: unsupported use of WITH clause
Removing the braces around the WITH works, which can be achieved by changing the
insert_all
clause injamdb_oracle_query.ex
to:(
cte_query
in line 253 adds braces too, but that didn't seem relevant here)