November 20, 2008 at 2:28 am
SQL2005
Importing a csv file into a table.
I know this is a small change I need to make in the import process but I just cant work it out.
SSIS Error reads:
Error: 0xC0202009 at ImportFiles, Insert into Bargains [347]: 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: "Invalid character value for cast specification".
Error: 0xC020901C at ImportFiles, Insert into Bargains [347]: There was an error with input column "Column 3" (436) on input "OLE DB Destination Input" (360). The column status returned was: "The value could not be converted because of a potential loss of data.".
Error: 0xC0209029 at ImportFiles, Insert into Bargains [347]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (360)" failed because error code 0xC0209077 occurred, and the error row disposition on "input "OLE DB Destination Input" (360)" 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.
Error: 0xC0047022 at ImportFiles, DTS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Insert into Bargains" (347) failed with error code 0xC0209029. 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.
November 20, 2008 at 2:59 am
Hello,
The point to notice would be “The value could not be converted because of a potential loss of data”.
So it is to do with the data that you are trying to import. Examples of this could be dates in the wrong format, or strings too large to fit in the destination column.
Regards,
John Marsh
www.sql.lu
SQL Server Luxembourg User Group
November 20, 2008 at 3:12 am
Thanks John,
An example of a row in the csv file:
"ABERDEEN FUND MANAGERS LTD","B","VOD.L","19 NOV 2008","1.249547","ABERD9001","GM","586.85","-390644.32","313100","GBP","B16GWD5"
So the error related to the Date field '19 NOV 2008' the colum is set to a DataType of Text_Stream[DT_Text].
In another import which works, the file contains the date as 19-NOV-2008 (notice the -).
This is also set as DataType of Text_Stream[DT_Text] and works fine.
November 20, 2008 at 3:21 am
Hello again,
It probably is the date format that is causing the problem.
If it is a one off then you could manually fix the incoming data before trying the load again.
If that works then may be take a look at the suggestions in this thread for a permanent fix:-
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=279107&SiteID=1
Regards,
John Marsh
www.sql.lu
SQL Server Luxembourg User Group
November 20, 2008 at 3:25 am
Thanks again, No unfortunatily its not a one off.
This file gets replaced everday and will be in the same format.
I will have a look that that thread, thanks.
What Data type could I use to accomidate for a field with vaules of 19 NOV 2008.
ITs like a varchar right? number & text...
Thanks John!!!:)
November 20, 2008 at 3:43 am
Hello,
Varchar should be Okay.
I think the use of a Derived-Column like the one detailed in the MSDN thread would be the permanent solution.
Regards,
John Marsh
www.sql.lu
SQL Server Luxembourg User Group
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply