Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

update multiple rows in MS-SQL using excel sheet

$
0
0

I have a database running on SQL 2008r2 that I need to update multiple rows in one table. The reason for this is that I had a user that has been entering their information into the wrong field since October and now their report is blank.

If I were doing it one line at a time, I'd be running something like this:  "update DB_time set explanation='test' where noteid='883' 

The problem is that there are 87 records to update and the text for the "explanation" column is consistently different (and lengthy) for each record. Tedious and prone to errors!

I already have the values paired up in an excel sheet. Can I not use that to update the table?


Viewing all articles
Browse latest Browse all 4871

Trending Articles