title: How to get a loop value in MySQL stored procedure?
body: <pre><code>FOR I = 1 TO 10
      tRESNUM = ALLTRIM(STR(I))
      tRESCAS = 'tRESCAS'+tRESNUM         
  
      &amp;tRESCAS = 0.00
  
  ENDFOR    
  </code></pre>
  
  <p>I am converting this fox-pro code to MySQL Stored Procedure.</p>
  
  <p>In Foxpro tRESCAS = 'tRESCAS'+tRESNUM gives tRESCAS1, tRESCAS2,..
  and &amp;tRESCAS gives the value which is tRESCAS1 or tRESCAS1 or ... something else.</p>
  
  <p>For example</p>
  
  <pre><code>if I =1 =&gt;
  
  FOR I = 1 TO 10
          tRESNUM = ALLTRIM(STR(1))
          tRESCAS = 'tRESCAS'+1       
  
          tRESCAS1 = 0.00         
  ENDFOR
  
  If I =2 =&gt;
  
  FOR I = 1 TO 10
          tRESNUM = ALLTRIM(STR(2))
          tRESCAS = 'tRESCAS'+2       
  
          tRESCAS2 = 0.00         
  ENDFOR
  </code></pre>
  
  <p>&amp;tRESCAS Automatically take the tRESCAS value tRESCAS1 or tRESCAS2 like this.</p>
  
  <p>In Stored Procedure How Can i get this type of Value?. (is any Special variable in stored procedure like &amp; this?)</p>
  
  <p>Is this details enough?.</p>