Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS error from flat file to table Expand / Collapse
Author
Message
Posted Saturday, September 15, 2012 9:23 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, February 21, 2013 12:01 PM
Points: 149, Visits: 346
hi,

i am inserting data from flat file to sql table usig SSIS.
my flat file is

empid,empname,salary
1,david,1000
2,krik,3456
3,van,4532
4,venus,345

my table in sql is
create table emp
(empid int,
empname nvarchar(50),
salary int)


now when i insert int oledb des, i am getting error like

"Column empname cannot convert between unicode and non unicode data type"

why this is coming and how to solve it
Post #1359813
Posted Saturday, September 15, 2012 5:12 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 28, 2014 12:04 PM
Points: 35, Visits: 98
try playing around with the datatype of the empname on the source between WSTR and DWSTR.
Post #1359857
Posted Saturday, September 15, 2012 10:09 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 9:51 AM
Points: 5,446, Visits: 7,616
You're delivering to a unicode string (nVarchar) and your file source definition is most likely string instead of unicode. Modify the source to be unicode, or use the datatype converter tool and generate a new column switching from non unicode to unicode, and put that into the target table.


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1359865
Posted Wednesday, September 19, 2012 12:57 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 6:37 AM
Points: 1, Visits: 28
Use a data conversion task to convert the non unicode valuesto unicode valued, it will resolve the issue.
Post #1361157
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse