1. Open the Enterprise Manager, open the database for which you want to import data, right-click the table, and select all tasks --> import data. The DTS import/export wizard is displayed, and press next,
2. Select the data source Microsoft Excel 97-2000, select the xls file to be imported as the file name, and click Next,
3. Select the Microsoft ole db provider for SQL Server, select local for the server (for example, vvv for a local database), and use SQL Server Authentication, user name SA, the password is blank. Select the database (such as client) for which you want to import data, and click Next,
4. Select a query item to specify the data to be transmitted, and click Next,
5. By the Query Builder, you can add columns in the source table list to the selected column list on the right of the xls file to be imported, the order of adding columns must be the same as that defined by fields in the database. Otherwise, an error will occur. Follow the next step,
6. Select the order in which the data will be arranged. In this step, the columns selected are the columns followed by order by in the query statement,
7. If you want to import all data, select all rows and click Next,
8. The query statement generated based on the previous operation is displayed. After confirming that the statement is correct, follow the next step,
9. You will see the table/worksheet/Excel naming area list. In the target column, select the table to be imported and click Next,
10. Select Run now and click Next,
11. You will see the summary of the entire operation. Just click Finish. Software Development Network
Of course, there are multiple options for some of the above steps. You can select the appropriate options as needed. For example, if you are interested in programming, you can choose to save the DTS package and save it as a visual basic file in step 1. You can check the code in it to improve your programming level.
Http://www.mscto.com/database/2009012314303.html