SQL Server Performance

non-unicode to unicode error

Discussion in 'SQL Server 2005 Integration Services' started by arkiboys, Nov 7, 2007.

  1. arkiboys Member

    My ssis package exports .xls file data into a sql server table.
    The fields in the sql server table have to be nvarchar instead of varchar.
    If I use varchar then the ssis package gives an error about converting unicode to non-unicode...
    Another ssis package exports .csv data into the sqme sql server table as above.
    This time the sql server table fields have to be of type varchar because otherwise the ssis package gives an error about converting non-uniciode to unicode...
    I basically would like to have a sql server table with varchar fields and let these packages import into it.
    These packages may retrieve data from .csv or .xls.
    How can I resolve this?
  2. techbabu303 New Member

    U need add SQL script component which converts varchar to nchar using the CAST or CONVERT functions before dumping into SQL server.
    Check BOL you find ample examples on this, Iam not able to locate SSIS example on it yet but Iam sure the Gurus will in next post.
  3. satya Moderator

    Why not use NVARCHAR type in this case?
    What error you are getting on converting unicode data?
  4. arkiboys Member

    Solved by using the convert function.
  5. dineshasanka Moderator

    you can use data conversion component as well

Share This Page