import excel to SQL

snooper

Perch
hi all

i have a table in a MSSQL DB, that i would like to import data from an excel doc.

there is an indetity column, which i hope will incerment properly.

how can i do this?

thanks!
 
snooper said:
hi all

i have a table in a MSSQL DB, that i would like to import data from an excel doc.

there is an indetity column, which i hope will incerment properly.

how can i do this?

thanks!

In enterprise manager, right click on the table and go to all tasks>export data. This will start the data transformation services import/export wizard. Click next (enter password, if required) and then on the choose a desination window, select the version of XL you wish to import to. Finish the wizard, setting any field mapping and other parameters as you wish. The identity column will export as integers in XL which you may then increment via a formula if you wish.
 
Hi Snooper

I just realized that I gave you instructions on how to import from MSSQL to XL. To do the converse do the following:

In enterprise manager, right click on the table and go to all tasks>import data. This will start the data transformation services import/export wizard. In the source window, select the version of XL you wish to import from. Click next (enter password, if required) and use the default, "copy table(s) and view(s) from the source database. Click Next. Select the source and destination tables you wish to copy. If you have a key field in the desination database which uses an incremented identity, click on the box in the transform column and check "enable identity insert" checkbox. Click OK, then next to either execute or schedule the package.
 
Back
Top