SQL Server: Update Zips, see if zips exist, Update Carrier to correspond with Zips -


vcaccountnum | izone | vczipstart | vczipend | vccarrier1  | vccarrier2 | vcterminal1 | vcterminal2 | das 

i want see if zip exists out of 6000 zips. zipend , zipstart same. if abc carrier either/or vccarrier1 or vccarrier2 vcterminal1 and/or vcterminal2 need updated new code, example jfk.

i need flag das y or n depending on zip.

i thinking of using in of zips.

i have every often. looking @ way make sp or 1 done without spending day on it.

thank you,

i think searching query this:

update yourtable set     vcterminal1 = case when vccarrier1 = 'abc carrier' 'newcode' else vcterminal1 end,     vcterminal2 = case when vccarrier2 = 'abc carrier' 'newcode' else vcterminal2 end,     das = case when 'zip code' = 'depeneds' 'y' else 'n' end     'zip code' between vczipstart , vczipend 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -