title: Trigger to update a table with timestamp when data is inserted into another table
body: <p>I am very new to triggers. need help here. </p>
  
  <p>I have two tables, <code>[dbo].[Demand_Request]</code> and <code>[dbo].[Modified_Demand_Request]</code>.</p>
  
  <pre><code>CREATE TABLE [dbo].[Demand_Request] 
  (
      [CASE_ID] [INT] NULL,
      [TE_PART_NUMBER] [NVARCHAR](50) NULL,
      [VALUE] [FLOAT] NULL,
      [DEMAND_DATE] [DATETIME] NULL
  ) 
  
  CREATE TABLE [dbo].[Modified_Demand_Request] 
  (
      [CASE_ID] [INT] NULL,
      [TE_PART_NUMBER] [NVARCHAR](50) NULL,
      [VALUE] [FLOAT] NULL,
      [DEMAND_DATE] [DATETIME] NULL,
      [Modified_On] [DATETIME] NULL
  ) 
  </code></pre>
  
  <p>When data is inserted into <code>[dbo].[Demand_Request]</code>, I want to add the same data into table <code>[dbo].[Modified_Demand_Request]</code> along with a timestamp. </p>
  
  <p>Below is my trigger, but it is not working:</p>
  
  <pre><code>CREATE TRIGGER [dbo].[Modified_Demand_Request1]
  ON [dbo].[Demand_Request]
  AFTER UPDATE
  AS
       INSERT INTO [dbo].[Modified_Demand_Request] ([CASE_ID], [TE_PART_NUMBER],[VALUE], [DEMAND_DATE], [Modified_On])
           SELECT 
               [CASE_ID], [TE_PART_NUMBER], [VALUE],
               [DEMAND_DATE], GETDATE()
           FROM 
               INSERTED
  </code></pre>