View blogs by industry experts on topics such as SSAS, SSIS, SSRS, Power BI, Performance Tuning, Azure, Big Data and much more! You can also sign up to post your own business intelligence blog.
This article describes an easy way to copy and paste columns from excel to a sqlserver table. The basic requirement for this is the column names in both excel and sql server tables should be the same.
The excel file sample used in this article has three columns. Ethnicity_id, Ethnicity and Employees.
The first step is to create a database and a table with the same columns as in the excel spreadsheet.
I have used the test database as shown below.
The next step is to copy the data from the excel file as shown below. Make sure you copy the data only (Ctrl+C).
The next step is to open the SSMS and right click on the table (Test table that you have created). Click on Open Table from the menu that appears.
When the table opens, click on the top left corner as shown in the screen below.
The row gets highlighted as shown above. Now right click on the top left corner and choose paste. This will paste the values from excel to the sql server table.
This procedure is mainly useful when there are ad-hoc requests that require you to copy data from excel into a table.
Other posts by indupriya