Pulling data from a cmdb into another repository. Problem is the cmdb data has misspelled/duplicate records (e.g., some assets have a Department Name as Marketing, or Markting, or Marketing& -- when they are all just in Marketing). Want to run a select query that displays all incorrectly named department records as the single, correct name. Any help on how to approach this?
SQL Select Query - Removing Duplicates/Misspelled Data
606 views Asked by user3717899 At
3
There are 3 answers
0
On
I'm sure this is passed but http://openrefine.org/ would probably help you clean the messy data.
You can use CASE in to display "marketing" for its wrong entries. But query can be complicated depending on variations.
Better + easier way is a global search and replace in column. Following article describes it:
http://www.codecandle.com/articles/sql/update/483-sql-update-with-global-search-and-replace.html
Cleaning duplicate rows, following article may help:
http://www.codecandle.com/articles/sql/windowing/503-deleting-duplicate-rows-using-windowing.html