由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - Truncation error import csv file to SQL table (转载)
相关主题
报一个offer请教个SQL的问题
一道关于两倍年龄的题目 (转载)问个sql 题
a C question about global variable请帮忙回答一个SQL问题
how to do data fitting to find distribution (转载)求教一个SQL的问题
find distribution paramters only by data mean and std. dev. (转载)SQL find distinct values in large table (转载)
将军们分析一下微信随机红包是怎么分布的? (转载)SQL copy a table into a new table and add a new column (转载)
SQL combine two columns from two different tables no shared columnsSQL multiply all values of a column in table (转载)
坑爹, 周末老板还要我写, codeSQL add some columns into a table from another table
相关话题的讨论汇总
话题: sql话题: import话题: error话题: table话题: truncation
进入JobHunting版参与讨论
1 (共1页)
l******9
发帖数: 579
1
【 以下文字转载自 Database 讨论区 】
发信人: light009 (light009), 信区: Database
标 题: Truncation error import csv file to SQL table
发信站: BBS 未名空间站 (Wed Apr 29 15:28:46 2015, 美东)
I would like to import a .csv file into a SQL Server 2008R2 database table
on Win 7.
It has one column and one row.
File1:
name
runeocnu 430274 sjunosnv djduenvop 934m ljfonm3
I got error:
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data
conversion for column "NAME" 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)
I have created the destination table
CREATE TABLE my_tbl
(
[NAME] [varchar](1024) NULL
) ON [PRIMARY]
The data column width is large enough to hold the string. Why still got the
truncation error ?
But, if I used SQL query "insert into" in SQL Server Management Studio, it
worked well.
Also, in the import wizard, in colum mappings window, the source column is
NAME string [DT_STR] (50)
It should be 1024 ?
Any help would be appreciated.
l*******d
发帖数: 204
2
烙印?

【在 l******9 的大作中提到】
: 【 以下文字转载自 Database 讨论区 】
: 发信人: light009 (light009), 信区: Database
: 标 题: Truncation error import csv file to SQL table
: 发信站: BBS 未名空间站 (Wed Apr 29 15:28:46 2015, 美东)
: I would like to import a .csv file into a SQL Server 2008R2 database table
: on Win 7.
: It has one column and one row.
: File1:
: name
: runeocnu 430274 sjunosnv djduenvop 934m ljfonm3

1 (共1页)
进入JobHunting版参与讨论
相关主题
SQL add some columns into a table from another tablefind distribution paramters only by data mean and std. dev. (转载)
SQL fast search in a 10 million records table将军们分析一下微信随机红包是怎么分布的? (转载)
SQL 面试问题SQL combine two columns from two different tables no shared columns
招聘: Quantitative Business Analyst @ Google (转载)坑爹, 周末老板还要我写, code
报一个offer请教个SQL的问题
一道关于两倍年龄的题目 (转载)问个sql 题
a C question about global variable请帮忙回答一个SQL问题
how to do data fitting to find distribution (转载)求教一个SQL的问题
相关话题的讨论汇总
话题: sql话题: import话题: error话题: table话题: truncation