title: SQL Date Range from current year
body: <p>I need to make a function in SQL on SSMS to get sums of columns pertaining to a certain date range (From 9-1 of a year until 8-31 of the next year). the issue is that each year this date range will change.</p>
  
  <p>I know how to code in SQL:</p>
  
  <pre><code>Create View DateRangeRDView AS
  Select RD1, RD2, RD3, RD4
  From SomeTable
  Where  PerformanceDate BETWEEN '20140901' AND '20150831'
  </code></pre>
  
  <p>but when the date range in the view needs to change to <code>BETWEEN '20150901' AND '20160831'</code>, I have to create a whole new view.</p>
  
  <p>I also am aware of <code>GetDate()</code> to get current date but am unsure how to implement it to help here. Is there to do this where <code>GetDate()</code> will  be able to check if it's past <code>09-01</code> without declaring year then if it is past <code>09-01</code> <code>SELECT between 09-01-CURRENTYEAR and 08-31-NEXTYEAR</code> or it is before <code>09-01</code> <code>SELECT between 09-01-LASTYEAR and 08-31-CURRENTYEAR</code>? This will always pertain to the current year in this particular view/query</p>