Is it possible to Compare two columns in Microsoft SQL server so that the comparison skips punctuation marks and other character like %, ' etc? -


i have 2 columns having data below.

column1
amc standard, school

column2
amc standard school.

in need compare these 2 columns such comparison made words , not additional, meaning above example column1 , columnc match due comma ",' , period sign "." simple comparison of column1 , column2 suggests mismatch.

you can replace non comparable characters empty string (in case , , .)and compare them. this.

select 1 replace('amc standard, school',',','') = replace('amc standard school.','.','') 

based on jarlh comments, should (if possible) update columns , remove punctuation marks if not using in comparison , display.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -