title: Stored procedure error .. Inserting columns from one table to another
body: <p>I have stored procedure in which i am trying to insert two columns in a table, value of one column is from another table and the value of second column is constant and passed in the parameter.</p>
  
  <p>I think i will have to use a loop of somekind but I have no idea how. Kindly help</p>
  
  <p><strong>MY stored Procedure</strong></p>
  
  <pre><code>CREATE PROCEDURE sp_MTS_MTS_MemberTracking_request
      -- Add the parameters for the stored procedure here
  @monthYear datetime 
  AS
  
  select [MemberId] from [dbo].[MTS_Members] where Is_Active='true'
  
  insert into [dbo].[MTS_MemberTracking] (MemberId,MonthYear)values ((select [MemberId]
   from [dbo].[MTS_Members]
   where Is_Active='true'),@monthYear)  
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <p>Msg 512, Level 16, State 1, Line 1
  Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, &lt;, &lt;= , >, >= or when the subquery is used as an expression.
  The statement has been terminated.</p>