Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 SSIS file import failure on a datetime filed

Author  Topic 

milena
Starting Member

16 Posts

Posted - 2008-09-12 : 04:54:56
Hello,
I am using an SSIS package to import data from a flat file into a table in our database.This package has been working OK for long time.
Recently I started recieving following errors while importing files:
Data conversion failed while converting column "DateTimeColumn" (39425) to column "DateTimeColumn" (45830). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data."
However the import will pass after couple of attempts to import the file. This is really strange .My question is :Does someone have an idea what might be the cause for this as clearly data is OK and the package works .
I have experienced the same problem in a field that is an integer.

Thanks in advance

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2008-09-12 : 08:12:03
Are you sure the data is OK? Is it delimited, fixed or layout change? Try a small sample of 10 good records and run it over and over to see if you get any errors. If you have thousands or millions of records then one could be the trouble maker.
Go to Top of Page

milena
Starting Member

16 Posts

Posted - 2008-09-12 : 09:00:30
quote:
Originally posted by rgombina

Are you sure the data is OK? Is it delimited, fixed or layout change? Try a small sample of 10 good records and run it over and over to see if you get any errors. If you have thousands or millions of records then one could be the trouble maker.


Hi

yes the file is comma delimited and when I open it in excel , filter the field everything looks ok ,saying as data in all rows is the same - meaning it`s reporting period that is the same for all records in the file.
The weird thing is when I keep runing the file couple of times it does import ok without me modyfying the file at all.
Thanks for response by the way
Go to Top of Page
   

- Advertisement -