tsql - Fast way to dynamically update an SQL table -


currently, taking imported data process , doing merge temp table specific data use calculations , putting data it's proper locations in tables on our end. issue having 1 of columns state column in data provided in poor manner. data populating column in several different formats texas, tx, mt..

is there way within merge take out "." @ end of abbreviation or dynamically change states spelled out abbreviation? if not within merge after data gets set in temp table, there way run quick update statement without having go write out 50 times each state? still relatively new sql , answer can think of fix in fast manner have bunch of update statements run in sequence, writing out 50 update statements seems on kill , imagine there has better way without looping row row 40,000~ records or @ time.

any appreciated!

if understood correctly,

update yourtable set statecol = replace(statecol,'.','') 

try this, replacing dot empty string.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -