Hi everyone
I just downloaded developer edition and I am learning about SQL Server. I am getting an error when I import CSV files. It worked fine for the first import but the second one failed. To do the import I did the following: DB -> Tasks -> Import Data. I appended data to an existing table in SQL Server.
Here is the error stack I got when I imported the second file (see below). It looks like it doesn't like the "open_interest" field. The data type is numeric(10, 5). The largest the value can typically get is low 6 figures so I think the data type is ok. Does anyone know how I can fix this issue?
- Copying to [dbo].[Options] (Error)
Messages
Error 0xc02020c5: Data Flow Task 1: Data conversion failed while converting column "open_interest" (138) to column "open_interest" (333). The conversion returned status value 6 and status text "Conversion failed because the data value overflowed the specified type.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[open_interest]" failed because error code 0xC0209082 occurred, and the error row disposition on "Data Conversion 0 - 0.Outputs[Data Conversion Output].Columns[open_interest]" 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 "Data Conversion 0 - 0" (197) failed with error code 0xC0209029 while processing input "Data Conversion Input" (198). 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)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - UnderlyingOptionsEODCalcs_2020-02_csv 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)
The data type will need changing to something which allows 6 digits before the decimal place.
NUMERIC(10,5) max number is 99999.99999
So you would need a NUMERIC(10,4) for example which would allow 999999.9999
Remember numeric as the number of digits total, then the number of those digits which is after the decimal point.
November 14, 2021 at 6:41 am
Thank you so much! That worked.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply