title: SQL Trigger Looping insert to another table
body: <p>Currently working on trigger for update and insert for particular data row.</p>
  
  <p>However, im having difficulty with this details:</p>
  
  <p><strong>Table1</strong> with fields</p>
  
  <pre><code>EmployeeNumber  |  FirstName | MiddleName |  LastName  
  </code></pre>
  
  <p><strong>Table2</strong> with fields:</p>
  
  <pre><code>EmployeeNumber  |  Value  | FieldName | DateEntry
  </code></pre>
  
  <p>What i need to do is, whenever theres a change from Table1 for declared fields, will insert to Table2.</p>
  
  <p>Sample:
  In Table1 EmployeeNumber 100 change the value of his <strong>FirstName</strong> from John to Jhon and <strong>LastName</strong> from Mark to Marcus.</p>
  
  <p>Entry for Table2 should be looks like this:</p>
  
  <pre><code>EmployeeNumber  |  Value  | FieldName | DateEntry
  100             |  John   | FirstName | Getdate()
  100             |  Mark   | LastName  | Getdate()
  </code></pre>