Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rohitmathur11
Yak Posting Veteran
77 Posts |
Posted - 2010-02-10 : 01:49:03
|
Hi,I am trying to import one excel file in to one table of sql server 2005 ..file extention is xls..I am getting following error..F2 is column of excel file and b is table column in whcih i want to insert data ...Truncation may occur due to inserting data from data flow column "F2" with a length of 255 to database column "b" with a length of 50.Any idea ... |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-10 : 01:52:38
|
that means your file has data which is having length more than max length of your table column. In such cases what do you want to do? insert truncated bit or ignore?------------------------------------------------------------------------------------------------------SQL Server MVP |
 |
|
rohitmathur11
Yak Posting Veteran
77 Posts |
Posted - 2010-02-10 : 02:17:34
|
In my excel file column F2 is only 'A' like one charecter is there in row and table column data type is nvarchar(50)..is there any other place i need to change or check .. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-10 : 02:34:44
|
can u check the mapping properties and see how its interpreting the excel column? is it considering it as nvarchar(255)?------------------------------------------------------------------------------------------------------SQL Server MVP |
 |
|
rohitmathur11
Yak Posting Veteran
77 Posts |
Posted - 2010-02-10 : 02:47:44
|
Thanks ...Yes In mapping ...for table columns it is showing nvarchar(50)..this is ok ...for excel columns F2,F3 it is showing varchar (255)..but in excel file only A,B one charecter is there ..this is test excel file .. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-10 : 03:02:24
|
quote: Originally posted by rohitmathur11 Thanks ...Yes In mapping ...for table columns it is showing nvarchar(50)..this is ok ...for excel columns F2,F3 it is showing varchar (255)..but in excel file only A,B one charecter is there ..this is test excel file ..
then change it in advanced properties to make length as 50------------------------------------------------------------------------------------------------------SQL Server MVP |
 |
|
|
|
|