transferring an excel unicode file to a sql database

  • hi guys i would like to know how to transfer an excel file which is in unicode format to ascii into a sql database in ascii

  • You need three components in your dataflow:

    * Excel source (together with the Excel Connection Manager)

    * Data Conversion component

    * OLE DB Destination

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • And when the data conversion component doesn't work, what else can you try?

    (still comes back with "cannot convert between unicode and non-unicode string data types")

  • What is the datatype exactly in the destination?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • tulenkog (5/26/2011)


    And when the data conversion component doesn't work, what else can you try?

    --

    Sorry dude: it does work, I can assure you.

    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

  • The first destination column is char(11)

    and there are a number of varchar columns as well:

    varchar(50)

    varchar(50)

    varchar(25)

    I'm using a Data Conversion transformation and setting each of these Data Types to:

    string[DT_STR] with Code Page set to 1252

    but still see an error on the OLE DB Destination: "cannot convert between unicode and non-unicode"

    for column #1. If I skip column 1 in the output, it gives the same message for column 2 (the first varchar column).

    I could *make* this work by changing the datatypes in the tables to nchar, nvarchar etc., but it seems to me that the Data Conversion transformation should keep you from having to redesign database structures. Plus, what happens in a 3rd-party app where I can't modify the db?

    Am I doing something really dumb?

  • The data conversion component doesn't actually convert the columns, it makes copies of those columns with the desired data type.

    Did you remap the columns in the destination?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Nope - I knew it was something really dumb. Thanks for your help!

Viewing 8 posts - 1 through 7 (of 7 total)

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