I have multiple entries in one table that I need to update the entries in the current production table with, to revert that data back before a migration so I can migrate that data again.
The queries I wrote to find the entries that need to be updated is below. There are four queries that I ran to find the information. There is a total of about 2500 lines that need to be updated.
Select * from St_Page
where fname like '01-%'
Select * from St_Page
where fname like 'h8%'
Select * from St_Page
where fname like 'h9%'
Select * from St_Page
where fname like 'ha%'
I checked the two tables and there are a total of 9 fields. 4 need to be updated the other 5 stay the same. The fields that need to be updated are VOLNAME, ADDDATE, SECTOR, and EXTID.
I am guessing I want to use the FNAME field to find the objects to update. Any ideas on how to write this update query. Both St_Page tables will be in the same instance of SQL but in different databases.