Excel import to SS2000; Error in the field; DTS
I am trying to import an excel file into a SQL Server 2000 database using DTS. It's nothing out of the ordinary, just a direct import. Where I work, we do this 1000 times a day. This procedure usually works without problems, but something must change in the file.
I am getting the following error:
I have verified that the "AssignmentID" column is stored as "text" in the excel sheet. I also tried changing it to generic. Exact error regardless of setting. The field does contain numbers ... I appreciate everyone's help with this!
Regards,
Frank
source to share
The answer has to do with the procedure expecting text, but even if you set the properties (in the format dialog) to "text", excel may not treat the data as text. And hence SQL Server (or libraries) won't process it for text.
When routines try to import it, the system thinks it is converting from number to text and expects data to be lost (even if no data is lost) and an error will occur.
If it turns out that I can work around this error by putting "(apostrophe) in front of each number specified. [IE '124321] This force differs in that it treats the number as text.
Hope this saves others the headaches I now have. :-)
Regards,
Frank
source to share