title: SQL Server: want to insert data into one column, rest nulls: not letting me
body: <p>Here's my script:</p>
  
  <pre><code>INSERT INTO
   AP09
  SELECT
    cds AS CDSCODE
  FROM
    P_Schools
  WHERE 
    active = 1;
  </code></pre>
  
  <p>There are ten columns in the AP09 table. All but the primary key (CDSCODE) are nullable. I just want to insert CDSCODEs from another table, and have the rest default to null. Instead I get an error:</p>
  
  <pre><code>SQL Server Database Error: Insert Error: Column name or number of supplied values does not match table definition.
  </code></pre>
  
  <p>If I supply the right number of nulls, the insert works. But the Microsoft documentation says (for INSERT command):</p>
  
  <pre><code>The Database Engine automatically provides a value for the column if the column: 
  
  --Has an IDENTITY property. The next incremental identity value is used.
  --Has a default. The default value for the column is used.
  --Has a timestamp data type. The current timestamp value is used.
  --Is nullable. A null value is used.
  --Is a computed column. The calculated value is used.
  </code></pre>
  
  <p>Anyone know why this does not seem to be working as advertised? This is costing me a lot of time, as I have to do this for a number of tables! (It's SQL Server 2005 BTW)</p>