I have been trying to identify which data type to use in a specific column, because I am encountering an error every time I import/export into my database.
I've tried nvarchar
, float
, decimal
but I can't upload it all.
Here's an example of data I need to upload in my database:
P/VHL01-032013-85433
Here's the 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 "TELEPHONE" (91) on input "Destination Input" (60). 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" (60)" failed because error code 0xC020907D occurred, and the error row disposition on "input "Destination Input" (60)" 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 - tbl_billdelivery" (47) failed with error code 0xC0209029 while processing input "Destination Input" (60). 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)
*Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020. (SQL Server Import and Export Wizard) – Erl John Ejay 54 mins ago
*Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - Sheet1$" (1) returned error code 0xC02020C4. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. (SQL Server Import and Export Wizard)
P/VHL01-032013-85433
would be a floating point number or a decimal value? That is a text value so the only valid data types will be char/varchar/nchar/nvarchar. Only you will know whether you need to account for unicode text in this column. That solved, you then need to identify what is the maximum possible length for that field. The current value is 20 characters. Could it exceed that? How large will it realistically get? Do not be lazy and specify(8000)
or(max)
. Finally, will that value always exist - ie is it nullable or not null – billinkc