title: How to generate an insert script from table in DB2
body: <p>I have a table in DB2 which I query to obtain a number of specific records which are of interest to me.</p>
  
  <p>Now, I want to generate an insertion script for this data. The export option provided doesn't work for me because I need to provide the generation script to my client.</p>
  
  <p>I read <a href="http://bytes.com/topic/db2/answers/761656-generating-insert-scripts-table-db2" rel="nofollow">here</a> about the possibility of using a third party tool such as DBArtisan. However, I do not have the possibility of downloading a third party tool.</p>
  
  <p>I use System i Navigator with DB2® for IBM®. </p>
  
  <p>EDIT: Based on @WarrenT 's question, I add more information so as to help improve my question. </p>
  
  <p>Assuming the SQL statement I have to query the database is</p>
  
  <pre><code>SELECT * FROM my_table WHERE colValue&gt;='500'
  </code></pre>
  
  <p>One of the suggested answers was to do:</p>
  
  <pre><code>INSERT INTO target_table 
  SELECT * FROM my_table WHERE colValue&gt;='500'
  </code></pre>
  
  <p>Although I do agree it would be the best solution, I cannot do this because in the target environment they do not have the table "my_table". I'm no expert in the different script types, I know I need the typical script </p>
  
  <pre><code>INSERT INTO target_table (parm1, parm2,...) VALUES (val1, val2,...)
  </code></pre>