mapping help.
-
I need to do the below: Import the excel file using the available SQL server tools to a temp db. Then write a mapping between the temp db and the Main database. Move the data to the Main database. Is this possible?? -----------------------------------------------------------------
where there is a will there is a way
-
I need to do the below: Import the excel file using the available SQL server tools to a temp db. Then write a mapping between the temp db and the Main database. Move the data to the Main database. Is this possible?? -----------------------------------------------------------------
where there is a will there is a way
INSERT INTO TableName(Column1, Column2, etc)
SELECT Column1, Column2, etc FROM #TempTableName
Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects My website
-
I need to do the below: Import the excel file using the available SQL server tools to a temp db. Then write a mapping between the temp db and the Main database. Move the data to the Main database. Is this possible?? -----------------------------------------------------------------
where there is a will there is a way
You should be able to use the oledb provider to link to excel and import the data into a datatable. From there you could use SQLBulk Copy to move the data easily if your column headers are the same, otherwise you will need to map the columns. If you do not want to this in code then the other suggestion might be better.
_____________________________________________________________________ Our developers never release code. Rather, it tends to escape, pillaging the countryside all around. The Enlightenment Project (paraphrased comment) Visit Me at GISDevCafe