Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's the <a href="http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0002159.htm" rel="nofollow noreferrer">DB2 SQL Message Reference</a>. Here's an extract of relevance for the SQLCODE and SQLSTATE you retrieved:</p> <blockquote> <h2>SQL0418N</h2> <p>A statement contains a use of a parameter marker that is not valid.</p> <h3>Explanation:</h3> <p>Untyped parameter markers cannot be used:</p> <ul> <li>in a SELECT list</li> <li>as the sole argument of a datetime arithmetic operation</li> <li>in some cases as the sole argument of a scalar function</li> <li>as a sort key in an ORDER BY clause </li> </ul> <p>Parameter markers can never be used:</p> <ul> <li>in a statement that is not a prepared statement</li> <li>in the fullselect of a CREATE VIEW statement</li> <li>in the triggered action of a CREATE TRIGGER statement</li> <li>in a query captured by DB2 Query Patroller </li> </ul> <p>The statement cannot be processed.</p> <h3>User Response:</h3> <p>Correct the syntax of the statement. If untyped parameter markers are not allowed, use the CAST specification to give the parameter marker a data type.</p> <h3>sqlcode: -418</h3> <h3>sqlstate: 42610</h3> </blockquote> <p>Unfortunately this doesn't answer your problem since your SQL seem to look fine. After <a href="http://www.google.com/search?q=sqlstate+42610+insert+into+select" rel="nofollow noreferrer">Googling</a> a bit more it look more like that the DB2 JDBC driver simply doesn't eat <code>INSERT INTO ... SELECT ...</code> statements in a <code>PreparedStatement</code>. It's unclear if that is missing in the SQL Message Reference or a bug in the JDBC driver.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload