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.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Importing from Excel

Author  Topic 

researcy
Starting Member

6 Posts

Posted - 2007-12-14 : 12:36:12
I have a list (200+) that I would like to pull off of an excel sheet and insert into the table. I have the script,

INSERT INTO tax_jurisdiction SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=C:\TaxJuris.xls;Extended Properties=Excel 8.0')...[TaxJuris$]

I get the error: Server: Msg 8114, Level 16, State 5, Line 1
Error converting data type nvarchar to numeric.

I'm at a loss. I've looked at all the fields and modified the deceimal fields to number format. What else should I be looking for?

tmitch
Yak Posting Veteran

60 Posts

Posted - 2007-12-14 : 15:52:58
If you have alphanumeric characters in one of your columns, and the first few columns are just numeric, the Jet driver may be detecting that Excel column as a number rather than a character field. Check out the following post, it has helped me out of a couple of such instances:
http://msmvps.com/blogs/nickwienholt/archive/2006/03/15/86379.aspx



---------------------

Tim Mitchell
Mitchell Information Consulting : www.mitchellic.com
Go to Top of Page

researcy
Starting Member

6 Posts

Posted - 2007-12-14 : 16:32:02
That's good info and I did change my registry, but I think my problem may lay within the db itself in as far as the data ty[e its expecting to see. I may have to do this manually, but would still like feedback if anyone else has any. Thanks.
Go to Top of Page
   

- Advertisement -