locked
SSIS - Importing from .CSV RRS feed

  • Question

  • All-

    I have a package that loops through a bunch of .csv files and imports.  Works great but is choking on one value for field "INVOICE" that does not make any sense.

    Specs:

    > In the flat file source editor, INVOICE has a datatype of DT_STR and length of 50 for both External & Output columns

    > No data conversion on this field

    > The target table has a datatype of varchar(255) for INVOICE 

    > I am getting the "data conversion for INVOICE failed...text was truncated etc" error on a specific file/value

    > Upon inspecting the offending value, it is an invoice of length 14 that is basically the same as all other invoices that imported without issue

    Any ideas why this isn't working?  I would rather avoid the Ignore Truncation error option and fix this properly.  

    Thank you!


    Bonediggler

    Friday, August 16, 2013 7:23 PM

Answers

  • What happens if you increase of the source column on the advanced editior page? Does it truncate while loading to destination?

    Thanks, hsbal

    • Marked as answer by Bonediggler Friday, August 16, 2013 8:32 PM
    Friday, August 16, 2013 7:40 PM

All replies

  • There must be either a hidden charter in the value you could not see using the simple tools as the Windows Notepad, or you do not see the whole picture properly.

    Try  inspecting the value in say Notepad++ with show all chars setting on.

    You are right about not ignoring the truncation.


    Arthur My Blog

    Friday, August 16, 2013 7:31 PM
  • Hi Arthur

    I checked it out with UltraEdit but do not see any hidden characters.  Any other ideas?


    Bonediggler

    Friday, August 16, 2013 7:38 PM
  • What happens if you increase of the source column on the advanced editior page? Does it truncate while loading to destination?

    Thanks, hsbal

    • Marked as answer by Bonediggler Friday, August 16, 2013 8:32 PM
    Friday, August 16, 2013 7:40 PM
  • Thanks Harry that seems to do the trick

    I synchronized the length of the source columns with the length of the destination columns.  Any idea what the logic is there?


    Bonediggler

    Friday, August 16, 2013 8:31 PM
  • you did it correctly...both lengths are in sync..

    Thanks, hsbal

    Friday, August 16, 2013 9:08 PM