How To Import Excel Sheet In SQL | Blogz Den
How to import excel sheet in SQL?
Via 8 easy steps you will know how to import excel sheet in SQL. Then add same sheet data into existing table.
1. Maintain Excel sheet and save as Microsoft Excel .97-2003 Worksheet.xls
2. Then go to SQL and Right Click on Database and click on "Task" and click "Import Data"
3. Click on choose Data source, File Path and Excel File Version. (Tick ✔ First row has column name if your file has)
1. Maintain Excel sheet and save as Microsoft Excel .97-2003 Worksheet.xls
2. Then go to SQL and Right Click on Database and click on "Task" and click "Import Data"
3. Click on choose Data source, File Path and Excel File Version. (Tick ✔ First row has column name if your file has)
SQL Query:
INSERT INTO [common.remitanywhere].[dbo].[tbworldbanks] --- (Existing Table)([CountryKey],[CountryName],[CountryCode],[BankName],[BankCode])SELECT[CountryKey],[CountryName],[CountryCode],[Bank Name],[BankCode]FROM [common.remitanywhere].[dbo].[chezbanks$] --- (Newly Created Table)
@: The above query will select your data from newly created table (after importing excel sheet) and insert into your existing table.
Post a Comment