SSIS Data Conversion

  • Hi,

    I created a package which copies data from one db1 to another db2. So in columns in one DB1 are nvachar and columns on db2 are varchar so i used data conversion task to do that. But now i need to use that package to copy data from db3 to db2 where columns in db3 are varchar only so when using that package i'm getting validation errors like

    Error at 2: Column "" cannot convert between unicode and non-unicode string data types.

    Can any one help me out with this please.

  • Have you tried using SQL in the data retrieval and then use a convert() in there?

    Rather than using a data conversion, TSQL would handle it.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • If DB3 is varchar and DB2 is varchar then you don't need a data conversion component at all... Perhaps you're trying to convert when you don't need to?

  • That is true - the data conversion task will throw an error if starting from a datatype that does not match the conversion in it (in this case a varchar). In this scenario, it works well to do it just in tsql instead.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

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

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