title: SQL select from table - only including data in specific filegroup
body: <p>I followed this article:
  <a href="http://www.mssqltips.com/sqlservertip/1796/creating-a-table-with-horizontal-partitioning-in-sql-server/" rel="nofollow">http://www.mssqltips.com/sqlservertip/1796/creating-a-table-with-horizontal-partitioning-in-sql-server/</a>
  Which in essence does the following:</p>
  
  <ol>
  <li>Creates a database with three filegroups, call them A, B, and C</li>
  <li>Creates a partition scheme, mapping to the three filegroups</li>
  <li>Creates table - SalesArchival, using the partition scheme</li>
  <li>Inserts a few rows into the table, split over the filegroups.</li>
  </ol>
  
  <p>I'd like to perform a query like this (excuse my pseudo-code)</p>
  
  <pre><code>select * from SalesArchival
  where data in filegroup('A')
  </code></pre>
  
  <p>Is there a way of doing this, or if not, how do I go about it.</p>
  
  <p>What I want to accomplish is to have a batch run every day that moves data older than 90 days to a different file group, and perform my front end queries only on the 'current' file group.</p>