title: SQLRPGLE. Is there something wrong with my SQL Query?
body: <br>
  Here is the SQL Query that I'm trying to run in my program. However I can't even compile it, I'm getting an error that's just telling me something is wrong in the query.
  <p>The error I get is &quot;<strong>SQL0117</strong> Statement contains wrong number of values&quot;.</p>
  <pre><code>/Free                                                        
     exec sql                                                  
     INSERT INTO NOEDTSR                                       
          SELECT * FROM NOEDEH AS deh                          
          WHERE EXISTS (SELECT act.AC2ACT FROM ACTEST AS act   
                                WHERE  act.AC2ACT = deh.N1ACTE 
                                AND    act.AC2CRB IN('C0','C2')
                                AND    act.AC2TYT = 'DEN')     
          AND   NOT EXISTS (SELECT sin.SISTE FROM SINREG AS sin
                                WHERE  sin.SISTE  = deh.N1STE  
                                AND    sin.SIGRP  = deh.N1GRP
                                AND    sin.SIIND  = deh.N1IND   
                                AND    sin.SIRANG = deh.N1RANG  
                                AND    sin.SIACTE = deh.N1ACTE  
                                AND    sin.SIREEL = deh.N1MERG  
                                AND    sin.SISECU = deh.N1EBAS) 
           AND N1DBSS = 20                                       
           AND N1DBSA = 21                                       
           AND N1TIER = '000000000000000';                       
   /end-free                                                       
  
  </code></pre>
  <p>I'm not specifying column_names here on purpose as I want to copy all of the columns from <strong>NOEDEH</strong> to <strong>NOEDTSR</strong>.
  <br>These two tables have the same structure as the DDS(Data Description Structure) used to compile both is the exactly same.</p>
  <p>Any thoughts?</p>