I could have designed an update for every specific possible outcome and it would have worked just fine, but here lately I try to accomplish something with one perfect query. Below I will show you both ways that I am talking about. You can pick the best one for your project.
I have a table called tblTable and in that table I have a fields/columns called DocumentType and DateReceived. I wish to ADD the year to the end of specific DocumentTypes that were received in 2015 for archiving purposes. The DocumentType I wish to archive are Certificate and Report only.
Table original called tblTable.
Table results after the SQL statements below.
The first way would be to do 2 separate update statements that would UPDATE each specific DocumentType with the desired results.
The second way (the way I prefer) is to combine both of the above statements into one.
Both ways will give you the desired outcome, but as you can see the second way would be a great time saver if you had quite a few DocumentTypes that needed to be updated.
Or if you prefer...