Importation de fichiers excel dans sql server 2008

Je sais que cette question peut être répété. Mais ce que je reçois problème, c'est différent. J'ai déjà créé une table "CRM_Doctor_Budget" l'absence de données.

Importation de fichiers excel dans sql server 2008

Je veux insérer des données dans cette table à partir de fichier excel.

Je suis à l'aide d'importation et d'exportation de données (32-bit).

Étape suivante je fais:

Importation de fichiers excel dans sql server 2008

Importation de fichiers excel dans sql server 2008

Importation de fichiers excel dans sql server 2008

Importation de fichiers excel dans sql server 2008

Importation de fichiers excel dans sql server 2008

Importation de fichiers excel dans sql server 2008

Importation de fichiers excel dans sql server 2008

Erreur que j'obtiens :

- 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)

Je suis d'erreur dans la conversion de type varchar,int,smallint,bits type de données. Parce que le fichier excel est en général de type de données pour toutes les données. Et Dans ma déjà créé table, j'ai varchar, int, float, smallint et peu.

Après avoir coché la case "Activer l'Identité Insérer" j'ai moins d'erreurs, mais des erreurs sont comme suit :

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)
avez-vous essayé de l'enregistrer en tant que fichier csv et d'insertion en bloc avec tsql? La syntaxe est assez facile. bulk insert [nom_table] à partir de [filepath.csv] avec (rowterminator il='\n', fieldterminator=',') vous avez juste besoin de couper les en-têtes de colonne de la fichier csv.

OriginalL'auteur IT_INFOhUb | 2013-03-06