title: SQL create table with filters
body: <p>I have an autogenerated create table SQL statement from the import/export wizard. However, the the table I am creating from has too many rows, therefore I would like to import only after a certain date.</p>
  
  <p>I have the following:</p>
  
  <pre><code>CREATE TABLE [DB1].[dbo].[Agent] (
  [UserId] nvarchar(50) NOT NULL,
  [StatusDateTime] datetime NOT NULL,
  [StatusDateTimeGMT] datetime NOT NULL,
  ) where StatusDateTimeGMT &gt;='2011-08-15'
  </code></pre>
  
  <p>When I try to add either a where clause with the <code>StatusDateTimeGMT</code> field being >='2011-08-15', it throws me an error. I also tried using a CHECK constraint, but with no success. Any ideas?</p>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>Error 0xc002f210: Preparation SQL Task: Executing the query<br>
    "CREATE TABLE [db1].[dbo].[Agent] (<br>
        [UserId] nvarchar(50) NOT NULL,<br>
        [StatusDateTime] datetime NOT NULL,<br>
        [StatusDateTimeGMT] datetime NOT NULL,<br>
        )where StatusDateTimeGMT >='20110815'  "
    failed with the following error: "Exception from HRESULT:
    0x80040E14". Possible failure reasons: Problems with the query,
    "ResultSet" property not set correctly, parameters not set correctly,
    or connection not established correctly.</p>
  </blockquote>