title: for Update Trigger - to insert values into a History Table
body: <p>This is what i have now:</p>
  
  <pre><code>GO
  /****** Object:  Trigger [dbo].[trg_SourceHistory]    Script Date: 03/08/2011 14:38:08 ******/
  SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  ALTER TRIGGER [dbo].[trg_SourceHistory] 
  ON [dbo].[tblSource]
  for UPDATE
  AS 
  begin try
  INSERT INTO tblHistorySource
  select *, getdate()
  from [DELETED]
  end try
  begin catch
  SELECT
  ERROR_NUMBER() AS ErrorNumber,
  ERROR_SEVERITY() AS ErrorSeverity,
  ERROR_STATE() AS ErrorState,
  ERROR_PROCEDURE() AS ErrorProcedure,
  ERROR_LINE() AS ErrorLine,
  ERROR_MESSAGE() AS ErrorMessage;
  RAISERROR('Error in Source Hisotry Trigger' ,16,1)
  ROLLBACK TRAN
  END CATCH
  </code></pre>
  
  <p>but i keep getting the following error: Insert Error: Column name or number of supplied values does not match table definition.</p>
  
  <p>i was thinking that maybe it would be a good idea to write out all the fields in the trigger to make sure everythign matches up, but i can't seem to figure out the format to do so.</p>
  
  <pre><code>insert into tblHistorySource (value1, value2) values (value1, value2)
  </code></pre>
  
  <p>where do i put this???</p>
  
  <p>Thank you in advance!</p>