0

I am updating a table in SQL Server Management Studio from an Excel doc by right clicking on the table I want to update, hitting edit top 200 rows, and trying to paste in my new line of data.

However when I do this I am coming up with couple of issues. First of all, the ID column is showing as NULL. Second, the line is read only (that by itself really isn't a problem for me, but it doesn't seem right) and finally some of my columns that do have values are showing NULL. enter image description here

When I try to import the excel spreadsheet (right click on database, tasks, import data) I get the error shown here.

courty340
  • 101
  • 3
  • 16
  • Refer below link : [How to import Excel Data into Table](https://stackoverflow.com/questions/39610133/how-to-import-an-excel-file-into-sql-server) – Kiran Sagvekar Jan 22 '21 at 04:35
  • 1
    Quite simply, SSMS is not really designed to be a GUI for entering mass quantities of data into your database. Neither is cut/paste designed for this purpose since it also involves a lot of assumptions based on what is actually stored into the windows clipboard (which you cannot see). Both Excel and SSMS have well-designed functions to perform ETL with a database and it is much better to use those tools. – SMor Jan 22 '21 at 12:52
  • @SMor Thanks. I have updated my question with the error message I was getting when I tried to import my excel file, which is what led me to try the copy paste method. Any idea what is causing this message? – courty340 Jan 22 '21 at 15:16
  • @KiranSagvekar see comment above/edits in post – courty340 Jan 22 '21 at 15:28

1 Answers1

0

You must to save excel file to Excel 97-2003 Workbook (*. xls). Then let begin with mapping your fields source to destination table.