csv data types

  • Hi

    fairly new still to SSIS (Using Visual Studio 2010) to get data into a SQL Server

    Now working with Excel CSV files (flat files)

    have issue where I have column OrderDepartment

    this comes up as cannot convert from Unicode to non Unicode...

    I had this issue or a few columns. so just added a data conversion as data type Unicode String [DT_WSTR] length 50

    but for this column it keeps getting a truncation error. I have tried changing the length to e.g 100, 200 , with no joy

    what other data conversion could I do or derived column?

    the column type in SQL is Nvarchar (255)

    the column data just looks like text and characters

    please help

  • joanna.seldon - Friday, June 30, 2017 5:14 AM

    Hi

    fairly new still to SSIS (Using Visual Studio 2010) to get data into a SQL Server

    Now working with Excel CSV files (flat files)

    have issue where I have column OrderDepartment

    this comes up as cannot convert from Unicode to non Unicode...

    I had this issue or a few columns. so just added a data conversion as data type Unicode String [DT_WSTR] length 50

    but for this column it keeps getting a truncation error. I have tried changing the length to e.g 100, 200 , with no joy

    what other data conversion could I do or derived column?

    the column type in SQL is Nvarchar (255)

    the column data just looks like text and characters

    please help

    First thing to note is that CSV files are nothing to do with Excel. Excel associates itself with the .CSV extension when it installs.
    Did you change the length of the incoming column in the 'advanced' data source editor / input and output properties / flat file source output / external columns?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Hi

    after loads of digging on Google ...

    advanced edit on the connection manager, columns, need to convert them there too, as well as using the data conversion

    regards

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply