开发者

Help understanding SQL Server import errors

I'm trying to understand why I am unable to import a data sheet into a SQL Server database. It is basically a few columns of data, with about ~15000 entries.

I get this error for a column:

Messages

Error 0xc0202009: Data Flow Task: SSIS Error Code DTS_E_OLEDBERROR.

An OLE DB error has occurred.

Error code: 0x80004005.

An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unspecified error".

(SQL Server Import and Export Wizard)

Error 0xc020901c: Data Flow Task: There was an error with input column "TO_PART_NBR" (121) on input "Destination Input" (87). 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: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "Destination Input" (87)" failed because error code 0xC020907D occurred, and the error row disposition on "input "Destination Input" (87)" 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)

Data looks like this:

ID  FRO FROM_PART_NBR   FROM_STYLE  FROM_MATER  FROM_SHAFT  FROM_BORE   FROM_WIDTH  TO_ TO_PART_NBR TO_STYLE_L  TO_MATERIA  ToLipMaterial   ToCaseMaterial  ToSpringMaterial    TO_SHAFT    TO_BORE TO_WIDTH    TO_FIT_VALUE    TO_REASON
33001   CR  100044  CRWHA1  R   10  11.252  0.625   TCM 10011256TA-H    TA-H    NCC NBR Carbon Steel    Carbon Steel    10  11.251  0.625   0   Style CRWHA1 to TA-H => Direct Material R to NCC => Direct
33002   CR  10028   HMS4    R   0.984   1.811   0.276   TCM 25X46X7SC   SC  NCC NBR Carbon Steel    Carbon Steel    0.984   1.811   0.276   0   Style HMS4 to SC => Direct  MaterialRto NCC => Direct

Does the (121) tell me what 'row' the issue is being thrown for? Or is that hoping too much? Usually I have been able to 'decipher' the error message, this one I am stumped on.

I have done the following:

  • Creat开发者_StackOverflow中文版ed an XLS with data (reviewed for oddities like blanks, string being too long, etc)
  • Attempted to use MSSQL wizard to import data into my table 'interchanges_append' (tmp table before I append that data to final).

Thoughts?


Just as a guess since this seems to involve part numbers and Excel, I would suspect the issue is that SSIS (which the wizard uses) uses only the first few lines to determine the datatype and it is using either a numeric type and the alpha numerics won't go into this. Or vice versa. Excel support is limited at best and if at all possible you should use .csv files or.txt files instead of Excel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜