Recently, I was working with some data imported from PDFs into a SQL Server table. Each row had several different attributes that would be split apart in a script. The export from PDF to text wasn’t perfect, there were several instances where 0 would come in as O, or a 1 as a 4, for example. I wanted to correct a few records, but I couldn’t just go through and replace all instances of a character, since some of them were valid. I really needed a way to just correct the records as I would in a spreadsheet, rather than writing UPDATES for each one.
Luckily, SSMS allows us to do this. If you find the table in Object Explorer then right-click, there’s an option to ‘Edit Top 200 Rows’.
Once the grid of records comes up, we can make our edits right in the grid. We just need to click in another row to save that change.
If we need to edit a record outside of the top 200, or we want to just return certain records, we can do that as well.

In the above image, we can click on the ‘SQL’ button in the toolbar, right underneath the ‘Window’ menu item (There’s also an icon with SQL and a check mark, to check the syntax). This will bring up a SQL pane, and we can add a WHERE clause to return the records that we want. We can click the ‘Execute SQL’ button in the toolbar, underneath the search bar, or use Control + R to run.

Normally, I would have a SQL Script to make these types of updates, but in this case, it was useful to be able to pick out a section of a value and update it right in the Results grid.