sql server - How to group by column having spelling mistakes -


while working legacy data, want group data on column ignoring spelling mistakes. think soundex() job achieve desired result. here tried:

select soundex(area) master group soundex(area) order soundex(area) 

but (obviously) soundex returned 4-character code in result rows this, loosing actual strings:

a131 a200 a236 

how include @ least 1 occurrence group query result instead of 4-character code.

select soundex(area) snd_area, min(area) area_example_1, max(area) area_example_2 master group soundex(area) order area_example_1 ; 

in mysql select group_concat(distinct area) list_area versions, , don't know in sql-server, min , max give 2 examples of areas, , wanted discard diffs anyway.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

What is the difference between data design and data model(ERD) -

ios - Can NSManagedObject conform to NSCoding -