Data Type Error


hello all,

i need in, deleting duplicate rows using composite key ( 2 columns)

i trying read csv file data sql server table getting data type mismatch error.

initally haing excel data file, has duplicate data have saved file .csv. have create composite key 2 columns , using combination duplictes should eliminated

sample data

col 1                                                                                               col2

row 1   asset disposition                                                                             asset disposition

row 2   asset disposition                                                                             asset disposition

row 3   capital contributions                                                                       capital contributions

row  4  capital contributions                                                                       capital contributions

row 5   certificate of compliance                                                        other covenant

row  6  certificate of compliance                                                        other covenant

row 7   debt service coverage ratio                                                           (gross income -less: expenses +plus: depreciation +plus: interest expense )/(divided by: principal paid on note # 42 +            plus: interest paid on note # 42 * property located at: 1768-1772 pleasant valley road, placeville, ca  95667. )

error getting is

data conversion failed. data conversion column "colum 2" returned status value 4 , status text "text truncated or 1 or more characters had no match in target code page.".

[flat file source [1]] error: "output column "col 2" (14)" failed because truncation occurred, , truncation row disposition on "output column "col 2" (14)" specifies failure on truncation. truncation error occurred on specified object of specified component.
this error row 7

i have tried data type unicode string [dt_wstr], string [dt_str], unicode text stream [dt_ntext]. in sql server have changed column data type varchar, char, nvarchar also.

in above sample data, col1, col2 composite key, row 2, row 4, duplicated want records deleted.

kindly me in this.

sam ponna.

 

hi sam,

your error messages state string compose long. maximum length ntext is  (i believe) 230 characters, if combine col1 col2 row 7 exceed value. try [dt_wstr] adequate length have max string length ccombinging col2 , col2..

cees


please remember mark replies answers or @ least vote helpfull if , unmark them if provide no help.


SQL Server  >  SQL Server Integration Services



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........