title: How to resolve SQL0418N Error
body: <p>I'm using the statement below to update/insert some data to a table and, if I run it without parameters, it's fine. However, as soon as I try to execute it using parameters it throws:</p>
  
  <p><strong>SQL0418N - A statement contains a use of an untyped parameter marker, the DEFAULT keyword, or a null value that is not valid</strong>.</p>
  
  <p>I've read the error information <a href="http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.messages.sql.doc/doc/msql00418n.html" rel="noreferrer">here</a>, but I'm still struggling with why my statement won't execute.</p>
  
  <pre><code>--This statement works
  MERGE Into AB.Testing_Table A
  USING (VALUES('TEST', 'P')) B(TEST_ID, "ACTION")
  ON (A.TEST_ID = B.TEST_ID)
  WHEN NOT MATCHED THEN
  INSERT (TEST_ID, "ACTION")
  VALUES ('TEST', 'P')
  WHEN MATCHED THEN
  UPDATE SET TEST_ID = 'TEST'
  ,"ACTION" = 'P';
  
  --This statement fails with error SQL0418N
  MERGE Into AB.Testing_Table A
  USING (VALUES(@TEST, @ACTION)) B(TEST_ID, "ACTION")
  ON (A.TEST_ID = B.TEST_ID)
  WHEN NOT MATCHED THEN
  INSERT (TEST_ID, "ACTION")
  VALUES (@TEST, @ACTION)
  WHEN MATCHED THEN
  UPDATE SET TEST_ID = @Test
  ,"ACTION" = @Action;
  </code></pre>
  
  <p>Thanks in advance for the help!</p>