title: Change value of inserted row's column with trigger
body: <p>I'm trying to write a trigger with this logic: </p>
  
  <p>After insert, if a certain column = 'Fprice_bat', change the value of a different column to '0000'.</p>
  
  <p>What I have written so far tries to simply add a new record to the table instead of updating the inserted line. </p>
  
  <p>My query looks like this right now. </p>
  
  <pre><code>CREATE TRIGGER [dbo].[TR_FixBatchTimes_I]
  ON [dbo].[HEADER_BAT]
  AFTER INSERT
  AS
  BEGIN
      SET NOCOUNT ON;
  
      DECLARE 
          @Starttime varchar(6),                      
          @Endtime varchar(6),                        
          @Batchstate varchar(30),                    
          @Batchtype varchar(30)                                                      
  
      SELECT
          @Starttime = F908,                          
          @Endtime = F910,                            
          @Batchstate = F914,                         
          @Batchtype = F916   
      FROM 
          inserted
  
      IF @Batchtype = 'FSPRICE_BAT'  
      BEGIN 
          INSERT INTO HEADER_BAT (F908, F910, F914)
          VALUES (0000, 2359, 'WAIT')
      END
  </code></pre>
  
  <p>I imagine my mistake is because I'm calling "Insert into header_Bat" and it should say something along the lines of insert into inserted... but that syntax isn't right. </p>
  
  <p>How do I make this query edit the inserted line instead of add a new record to the table? </p>