title: How to increase job order finish days column value in SQL SERVER by 1 automatic every day based on condition?
body: <p>I have a job orders system and when i create new job order i have the following columns order date , order status (open or close) , expected days column for example 5 days to finish this order and i have the actual days column this column actual days default value = 0 .
  I need to create trigger to increment the value of column actual days by 1 daily every new day automatically if the job order open.
  How can i do this trigger daily increment and update the value when new day start at 12 midnight ?<br>
  I am using SQL SERVER.</p>
  
  <p>This is my table:</p>
  
  <pre><code>CREATE TABLE [Documents_followup](
      [Doc_id] [int] IDENTITY(1,1) NOT NULL,
      [Document_subject] [nvarchar](200) NULL,
      [Date] [datetime] NULL,
      [Document_number] [nvarchar](50) NULL,
      [Doc_place_id] [int] NULL,
      [Doc_expect_time] [int] NULL,
      [Doc_finish_time] [int] NULL,
      [DocStatus_id] [int] NULL,
      [Notes] [nvarchar](100) NULL,
      [user_id] [int] NULL)
  </code></pre>