title: Auto populate column with value from another table
body: <p>Using SQL Management Studio, I have two tables, the first table contains information about each operator. The second table containing data input.</p>
  
  <p>The first table will contain a <code>UserID</code>, e.g. "Ollie" with their corresponding hours, e.g. 8.
  When data is input to the second table, with an Operator name of "Ollie", I need a field within this second table to auto fill as "8".</p>
  
  <p>The following is the table data from the second table, and a rough showing of what I am after.</p>
  
  <pre><code>CREATE TABLE [dbo].[tblTime](
      [RecordID] [int] IDENTITY(1,1) NOT NULL,
      [Operator] [nvarchar](50) NOT NULL,
      [Timein] [decimal](10, 4) NOT NULL,
      [UserBreak] [decimal](10, 4) NOT NULL,
      [Timeout] [decimal](10, 4) NOT NULL,
      [TotalTime]  AS (([Timeout]-[Timein])-[Userbreak]),
      [OperatorHours] AS (SELECT OperatorHours FROM tblUser t WHERE t.UserID = Operator),
  </code></pre>