title: Sql View To Search Through A Table Or Another View
body: <p>Good day </p>
  
  <p>May you kindly assist me, I have a SQL view That has txDate, reference, Amount
  like</p>
  
  <pre><code>  select TxDate, Reference, Amount
      FROM Transactions
  </code></pre>
  
  <p>Then I have a Table called Period, that has PeriodId, StartDate and EndDate</p>
  
  <p>so the period is by month, 
  LIKE</p>
  
  <pre><code>   PeriodID           StartDate               EndDate
       1                 2017/01/01              2017/01/31
       2                 2017/02/01              2017/02/29
       3                 2017/03/01              2017/03/31
       4                 2017/04/01              2017/04/30
  </code></pre>
  
  <p>And so on up until December which will be period 12,</p>
  
  <p>So i want to have the Query to Search the Period table using the txDate in my SQL View, for Example </p>
  
  <pre><code>        if txDate is '2017/02/25'
  </code></pre>
  
  <p>The Query must return the PeriodID in Which the TxDate is Between StartDate and EndDate, so in this instance it should be 2.</p>
  
  <p>So my result should be something like this</p>
  
  <pre><code>    txDate             Reference             Amount          PeriodID
      2017/02/25          INVOO1               2000               2
      2017/01/04          REC002                 30               1
      2017/03/05          SALE                 5000               3
  </code></pre>
  
  <p>How do I make that JOIN on Searching that Table to bring the PEriodID onto my SQL View...??</p>