title: Fast way to dynamically update an SQL table
body: <p>Currently, I am taking imported data from a process and doing a MERGE to a temp table with specific data to use to do some calculations and putting the data into it's proper locations in the tables on our end.  The issue I am having is that one of the columns is a state column in which data is provided to us in a very poor manner.  data is populating the column in several different formats like texas, tx, Mt..  </p>
  
  <p>Is there a way within the merge to take out that "." at the end of the abbreviation or dynamically change states that are spelled out to their abbreviation?  If not within the merge after the data gets set in the temp table, is there a way to run something like a quick update statement without having to go write it out 50 times for each state?  I am still relatively new to SQL and the only answer I can think of to fix this in a fast manner is to have a bunch of update statements run in sequence, but writing out 50 update statements seems to be over kill and I imagine there has to be a better way to do this without looping row by row for roughly 40,000~ records or so at a time.</p>
  
  <p>Any help appreciated!</p>