Data conversion failed - SQL Server

Hi
I have been trying to import a Text file from my system to an SQL Server Db.(2005).
I am using the Import& Export tool to do the same. One particular field is giving errror all the time as below.

**********
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "CounterpartyLongname" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
 (SQL Server Import and Export Wizard)
 
Error 0xc020902a: Data Flow Task 1: The "output column "CounterpartyLongname" (138)" failed because truncation occurred, and the truncation row disposition on "output column "CounterpartyLongname" (138)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
 (SQL Server Import and Export Wizard)

********
CounterpartyLongname is currently stored as NVARCHAR 50.

When i looked at the flat file the maximum stored charechters in the "CounterpartyLongname" field is 95 Charechters.

Hence i changed, in teh column mappings the Data type to NVARCHAR 150, but it is still giving the same error.

Any help as to how to import this file successfully.

Regards

siva_iafAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Rajkumar GsConnect With a Mentor Software EngineerCommented:
Just give a try

NVARCHAR(500)

Let me know

Raj
0
 
siva_iafAuthor Commented:
Screen shot of data type attached
Doc4.doc
0
 
siva_iafAuthor Commented:
Thanks. Modified using the advanced properties of the flat file and it worked.
0
All Courses

From novice to tech pro — start learning today.