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 |
it kid
Starting Member
2 Posts |
Posted - 2002-12-28 : 03:22:31
|
I using SQL 7.0 task ->Import data function from a excel file to a table, I wonder why I get this type of message and fail with "Column 4 is too large for the specified size". The table format is correct, auto create table have try,length field size is enough, step is correct, and I have no idea why I fail, I wonder is the excel file field length have cause such a problem, since some row rolumn lengthhave more than 400 chars, is it have any limit of the source column data length? Or anyone have faced such a problem before and get me a idea? Thanks a lot! |
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2002-12-28 : 10:22:56
|
varchar has a limit of 8000 chars.nvarchar 4000.What is the longest string in Column 4? |
 |
|
it kid
Starting Member
2 Posts |
Posted - 2002-12-29 : 10:53:11
|
Thanks for your reply, have fixed it. Might be someone will faced this too, so post the link below. I wonder why microsoft products always have so many such incompatiable issue that so difficult for someone to trace. http://support.microsoft.com/default.aspx?scid=kb;en-us;281517 |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-01-01 : 12:09:45
|
quote: I wonder why microsoft products always have so many such incompatiable issue that so difficult for someone to trace.
You've obviously never tried to find an answer on Oracle's website. |
 |
|
Kristen
Test
22859 Posts |
Posted - 2004-09-12 : 02:40:18
|
I've come up against this problem, and have found an additional solution. The TAB delimited and CSV routes are not much use if the XLS cells contain linebreaks etc., which may well be the case with lengthy text within a cell, and they may also lose some formatting etc.The Excel import driver for DTS only looks at the first 8 rows to determine whether a column has more than 255 characters, or not. This is adjustable in the registryHKLM\Software\Microsoft\Jet\4.0\Engines\Excel\TypeGuessRowsbut what value are you going to put in there? A couple of billion, "just in case"?So instead I inserted a dummy row at the top of the XLS with some big text in the revelvant columns, and then it imported fine.After the first failure, which identified the offending column, I changed the table that had been created to make that column TEXT instead of nvarchar(255), and second time around the import worked fineKristen |
 |
|
|
|
|
|
|