title: SQL Too many levels of trigger recursion
body: <p>@ <a href="http://www.mediafire.com/download/5h674s7wdzk8tek/m4_2013.db" rel="nofollow">http://www.mediafire.com/download/5h674s7wdzk8tek/m4_2013.db</a>
  I am using sqlitestudiov3.01 for the above databse. The problem is that it wont let edit data values &amp; initiates an error</p>
  
  <pre><code>An error occurred while commiting the data: too many levels of trigger recursion
  </code></pre>
  
  <p>This error get resolved if I drop my trigger. My triiger is as follows</p>
  
  <pre><code>CREATE TRIGGER MACRO_A
         AFTER UPDATE ON ELZ_A
         FOR EACH ROW
  BEGIN
      UPDATE ELZ_A
         SET CURRENT_DENSITY = ROUND( ( LOAD / 2.721 ) , 2 );
  
      UPDATE ELZ_A
         SET VOLTS_AVG = ROUND( ( VOLTS_T / ELEMENTS ) , 2 );
  
      UPDATE ELZ_A
         SET VOLTS_STNDR = ROUND( 2.4 +( ( 12.75 / 2.721 ) *( ( VOLTS_AVG - 2.4 ) / CURRENT_DENSITY )  ) -( ( 90 - CATHOLYTE_TEMP ) * 0.01 ) +( ( 32 - CATHOLYTE_CONC ) * 0.02 ) , 2 );
  
      UPDATE ELZ_A
         SET KF_FACTOR = ROUND( ( ( VOLTS_AVG -( 90 - CATHOLYTE_TEMP ) * 0.016 *( ( LOAD / 2.721 ) / 5 )  ) +( ( 32 - CATHOLYTE_CONC ) * 0.033 *( ( LOAD / 2.721 ) / 5 ) - 2.4 )  ) /( LOAD / 2.721 ) , 3 );
  
      UPDATE ELZ_A
         SET PRODUCTION = ROUND( 0.001492 * 24 * ELEMENTS * LOAD *( EFFICIENCY / 100 ) , 2 );
  
      UPDATE ELZ_A
         SET TEMP_CORRELATION = ROUND( 7 *( CURRENT_DENSITY / 3 ) *( 90 - CATHOLYTE_TEMP ) , 2 );
  
      UPDATE ELZ_A
         SET CONC_CORRELATION = ROUND( 14 *( CURRENT_DENSITY / 3 ) *( 32 - CATHOLYTE_CONC ) , 2 );
  
      UPDATE ELZ_A
         SET DC_POWER_PER_TON = ROUND( ( ( 24 * LOAD * VOLTS_T ) / PRODUCTION ) - TEMP_CORRELATION - CONC_CORRELATION, 0 );
  END;
  </code></pre>
  
  <p>Well I don't know if above follows standard but atleast in some applications it works flawlessly &amp; mimicks Excel formula calculation. Anyone with ideas</p>