title: SQL Server : JOIN and WHERE
body: <p>I'm trying to create a new table based on particular values that match between two tables and that works fine but my issue comes about when I try to filter the newly joined table by dates.</p>
  
  <pre><code>CREATE TABLE JoinedValuesTable
  (
       [Ref] INT IDENTITY(1,1) PRIMARY KEY,
       [Parties] CHAR(50),
       [Accounts] CHAR(50),
       [Amount] FLOAT
  );
  </code></pre>
  
  <p>The table above is created okay and I join insert values into it by joining two tables like this....</p>
  
  <pre><code>INSERT INTO JoinedValuesTable ([Parties], [Accounts], [Amount])
      SELECT 
          InputPerson.[PARTY], Input_Y.[R_Account_1], InputPerson.[Amount] 
      FROM 
          InputPerson
      JOIN 
          Input_Y ON InputPerson.[Action] = Input_Y.[Action]
  </code></pre>
  
  <p>And this works fine it's when I try to filter by dates that it doesn't seem to work....</p>
  
  <pre><code>INSERT INTO JoinedValuesTable([Parties], [Accounts], [Amount])
      SELECT 
          InputPerson.[PARTY], Input_Y.[R_Account_1], InputPerson.[Amount] 
      FROM 
          InputPerson
      JOIN 
          Input_Y ON InputPerson.[Action] = Input_Y.[Action]
      WHERE 
          InputPerson.[Date] BETWEEN '2018-01-01' AND '2018-03-03'
  </code></pre>
  
  <p>I'm not getting any values into my new table. Anyone got any ideas?</p>