sql - Derived Column Error -


i have column in table needs replaced part of word 1 used derived column there no change @ all

ex:

input:

s.no        name             department 1           mike             san diego soceity office 2           stat             new york soceity office 

output should like

s.no        name             department 1           mike             san diego s.o 2           stat             new york s.o 

in derived column used following code

replace(department,"soceity office", "s.o") 

confidentiality

the other thing aware beyond misspellings @sqlgrl pointed out (and welcome [ssis] tag) string operations going case sensitive.

replace(department,"soceity office","s.o.") 

you can see below, took sample data , ran through 2 different replace statements. 1 accounts proper spelling of society, other uses spelling (which why you're standardizing s.o.)

enter image description here

originally, had used "soceity office" , observing no change , again, due casing issue.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -