Skip to content

Commit

Permalink
closed #432
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur committed Jan 12, 2021
1 parent 05ac401 commit 74cd330
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion working/generic_update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ BEGIN
SET concept_name = REPLACE(concept_name, '', '-')
WHERE concept_name LIKE '%–%';

--Remove trailing escape character (\)
UPDATE concept_stage
SET concept_name = TRIM(TRAILING '\' FROM concept_name)
WHERE concept_name LIKE '%\\';
--7. Clearing the synonym_name
--Remove double spaces, carriage return, newline, vertical tab and form feed
UPDATE concept_synonym_stage
Expand All @@ -82,11 +87,16 @@ BEGIN
SET synonym_name = REGEXP_REPLACE(synonym_name, ' {2,}', ' ', 'g')
WHERE synonym_name ~ ' {2,}';
--remove long dashes
--Remove long dashes
UPDATE concept_synonym_stage
SET synonym_name = REPLACE(synonym_name, '', '-')
WHERE synonym_name LIKE '%–%';
--Remove trailing escape character (\)
UPDATE concept_synonym_stage
SET synonym_name = TRIM(TRAILING '\' FROM synonym_name)
WHERE synonym_name LIKE '%\\';
/***************************
* Update the concept table *
****************************/
Expand Down

0 comments on commit 74cd330

Please sign in to comment.