none
last scan date column getting data conversion error

    Question

  • Hello Friends, 

    I am using sql server 2008R2 with BIDS . i have column LastScanDate and values in it

         LastScanDate 

    1/1/1900

    1/2/2017

    1/28/2017

     This data i am receiving from source in CSV format.i am trying to import this field in to sq server.data type in my sql table is datetime.In flat file source connection manager advance editer i make data type as database timestamp.

    When i run the package it failed with following error.

    Errors reported to ERRORS_COURSE_CLASS_STATUS_T>>> SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "output column "Last Scan Date" (569)" failed because error code 0xC0209084 occurred, and the error row disposition on "output column "Last Scan Date" (569)" 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.

    Errors reported to ERRORS_COURSE_CLASS_STATUS_T>>> Data conversion failed. The data conversion for column "Last Scan Date" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".

    Errors reported to ERRORS_COURSE_CLASS_STATUS_T>>> SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Flat File Source" (1) returned error code 0xC0202092.  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.

    Please help how to resolve this issue.

    Friday, April 21, 2017 6:45 PM

Answers

  • Hello Friends i solved this issue with below steps by my self.

    1. in my csv source file i make lastupdatedate field format as m/d/yyy hh:mm format.

    2. i make datatype for this column in DFT as string.

    data loaded sucessfully.

    Thanks Russa Loski for your seggstions as well..

    • Marked as answer by SR_MCTS Saturday, April 22, 2017 3:14 PM
    Saturday, April 22, 2017 3:14 PM

All replies

  • I can't reproduce this on my SSIS 2012.

    One thing to confirm.  Your computer is set up to use standard American date settings, right?


    Russel Loski, MCSE Data Platform/Business Intelligence Twitter: @sqlmovers; blog: www.sqlmovers.com

    Friday, April 21, 2017 7:03 PM
  • I see dates save in table like yyyy-mm-dd hh:mm:ss msmsms
    Friday, April 21, 2017 7:09 PM
  • The display format in SQL is what you describe.

    However, when you run BIDS (2012 at least) SSIS can use the date settings on your local machine.  On my Windows 7 machine I found the Change the Date, Time or Number format.  You can see how your machine is configured to handle date strings.  If you don't use month / day / year, SSIS won't recognize those dates and you will need to use script (or expression) to get the date.


    Russel Loski, MCSE Data Platform/Business Intelligence Twitter: @sqlmovers; blog: www.sqlmovers.com

    Friday, April 21, 2017 7:46 PM
  • Hello Friends i solved this issue with below steps by my self.

    1. in my csv source file i make lastupdatedate field format as m/d/yyy hh:mm format.

    2. i make datatype for this column in DFT as string.

    data loaded sucessfully.

    Thanks Russa Loski for your seggstions as well..

    • Marked as answer by SR_MCTS Saturday, April 22, 2017 3:14 PM
    Saturday, April 22, 2017 3:14 PM