title: Pervasive Stored Proceedure with variable
body: <p>I want to run this code from my query windows inside Excel but I get an error after it completes the first statement. If can run it fine in PCC. I'm assuming I need to create a stored procedure with a variable. Parent = 'B-8579-K' is the variable value.  </p>
  
  <ol>
  <li>How to I create the stored procedure?</li>
  <li>How do I call the stored procedure and pass on the variable?</li>
  <li><p>Will the call even work from within Excel without causing an error?</p>
  
  <pre><code>delete z_Expl_BOM_Temp; 
  
  insert into z_Expl_BOM_Temp 
      select 
          Parent, L1_Child_Seq, L1_Child, L1_Child_QTY, 
          L2_Child_Seq, L2_Child, L2_Child_QTY, 
          L3_Child_Seq, L3_Child, L3_Child_QTY, 
          L4_Child_Seq, L4_Child, L4_Child_QTY, 
          L5_Child_Seq, L5_Child, L5_Child_QTY
      from 
          EGC_Expl_BOM_TT 
      where 
          Parent = 'B-8579-K' ;
  </code></pre></li>
  </ol>