简体   繁体   中英

Update database using data from Excel using SQL statement in SQL Server Import and Export Wizard

I am trying to import data from a column in a .xslx file into a database. I'm using SQL Server 2008 and in the Import and Export Wizard I select the file and go to "Write a query to specify the data transfer". My knowledge of SQL is basic and am not sure how I can select the data from the file.

What is an SQL statement that selects a column from an Excel file and updates the database with it? (any corresponding values already in the database can be overwritten)

It would be easier to just get the wizard to create the table and load the data for you instead of writing the query. Have you tried that? Is there something specific that you need it to do? It may be easier to just get the data into the database in some form, then massage it into its final form.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM