I'm having a hard time searching for this, and if this question has already been asked and answered I will gladly use that information.
I have a table that is basically complete. But I need to change the values of one column in that I have in a text file. The text file has paired values. One matches an existing value in another column of the table, the other is the new value I need to use to replace the old value in the table.
So for example I have stuff like this in the table:
Name Address
John Smith 123 Main St
Jim Brown 123 Main St
Bob Jones 123 Main St
And in the text file I have:
John Smith;123 Real Address
Jim Brown;456 Another Real Address
Bob Jones;789 Yet Another Address
I want to be able to match on the name and insert each matching address into the table. Can I do this in a big query? Perhaps an update with a join to a selected set of values like this:
UPDATE MyTable
SET Name = (SELECT **all my values here**)
WHERE Name = **something**
Or maybe it would be possible to export the entire table, and merge the values in a text file with a script, then reinsert the new table values? I can't figure out a convenient way to do this though.