September 11, 2011 at 10:54 pm
I am trying to import data from excel 2007 to existing table from SQL Server Management Studio 2008 but, i am having trouble and not able to achieve successful import.The excel has no columns and 2 columns have difrent datatype for example excel has float as datatype and destinaton has numeric.looks like excel has more columns too.can you please help me on this as I have a dead line tomorrow morning.I appreciate any help.
September 12, 2011 at 1:48 am
Hi,
I am not clear on what issue are you facing. But I have tried to create a test scenario. I have taken 1 test table and Test excel file. Test table has 3 columns while Excel file has 4 columns.
Using Import Data task in SSMS I have selected Excel file as source and Test data as destination. following is the snapshot:
Now click on Edit mappings button on SQL server Import Export wizard. You will find that, there is option of ignoring extra columns of Excel also the data conversion from Decimal to Int by default:
Click on next and on Mapping Preview page configure for ignore errors:
then Click Finish or Next til Finish. Package will get prepared and data will get transferred.
I am able to do it. Try in this way. If you face any issue do revert back.
Thanks and Regards,
Ramakant
---------------------------------------------------------------
Ramakant Shankar
InfoCepts | www.infocepts.com
Off: +91 712 224 5867 Ext 8388, +1 301 560 2591 Ext 8388
---------------------------------------------------------------
September 12, 2011 at 1:52 am
kutemom09 (9/11/2011)
I am trying to import data from excel 2007 to existing table from SQL Server Management Studio 2008 but, i am having trouble and not able to achieve successful import.
create linked server with your excel file and then query it like any other table in your database.
Google:- How to create linked server with excel from sql server
----------
Ashish
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply