title: Import excel file in sql server 2008
body: <p>I know this question might be repeated. But what I get issue with this is different. I have already created table "CRM_Doctor_Budget" with no data.</p>
  
  <p><img src="https://i.stack.imgur.com/gSBT7.png" alt="Table Created in sql server 2008"></p>
  
  <p>I want to insert data in this table from excel file.</p>
  
  <p>I am using import and export data (32-bit).</p>
  
  <p>Following step I do:</p>
  
  <p><img src="https://i.stack.imgur.com/QDH9q.png" alt="First step"></p>
  
  <p><img src="https://i.stack.imgur.com/XBIXh.png" alt="Second step"></p>
  
  <p><img src="https://i.stack.imgur.com/k3375.png" alt="third step"></p>
  
  <p><img src="https://i.stack.imgur.com/mkLtk.png" alt="5th step"></p>
  
  <p><img src="https://i.stack.imgur.com/cf0Al.png" alt="6th step"></p>
  
  <p><img src="https://i.stack.imgur.com/1HUlG.png" alt="7th Step"></p>
  
  <p><img src="https://i.stack.imgur.com/raibj.png" alt="8th step"></p>
  
  <p>Error which I am getting :</p>
  
  <pre><code>- Validating (Error)
  Messages
  Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "Id".
   (SQL Server Import and Export Wizard)
  
  Error 0xc0202045: Data Flow Task 1: Column metadata validation failed.
   (SQL Server Import and Export Wizard)
  
  Error 0xc004706b: Data Flow Task 1: "component "Destination - CRM_Doctor_Budget" (59)" failed validation and returned validation status "VS_ISBROKEN".
   (SQL Server Import and Export Wizard)
  
  Error 0xc004700c: Data Flow Task 1: One or more component failed validation.
   (SQL Server Import and Export Wizard)
  
  Error 0xc0024107: Data Flow Task 1: There were errors during task validation.
   (SQL Server Import and Export Wizard)
  </code></pre>
  
  <p>I am getting error in converting varchar,int,smallint,bit data type. Because excel file has general datatype for all data. And In my already created table I have varchar, int, float, smallint and bit.</p>
  
  <p>After checked "Enable Identity Insert" I get less error but errors are as follow : </p>
  
  <pre><code>Copying to [dbo].[CRM_Doctor_Budget] (Error)
  Messages
  Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
  An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Unspecified error".
   (SQL Server Import and Export Wizard)
  
  Error 0xc020901c: Data Flow Task 1: There was an error with input column "Id" (143) on input "Destination Input" (72). The column status returned was: "The value violated the integrity constraints for the column.".
   (SQL Server Import and Export Wizard)
  
  Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "Destination Input" (72)" failed because error code 0xC020907D occurred, and the error row disposition on "input "Destination Input" (72)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
   (SQL Server Import and Export Wizard)
  
  Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Destination - CRM_Doctor_Budget" (59) failed with error code 0xC0209029 while processing input "Destination Input" (72). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.
   (SQL Server Import and Export Wizard)
  </code></pre>