Changes

Translation Duplicate fix

1,489 bytes added, 14:47, 30 April 2016
Created page with "This query lists the duplicate translations created after the upgrade scripts or by the countries themselves. Note that the functions ''lower'' will be used so duplicates like..."
This query lists the duplicate translations created after the upgrade scripts or by the countries themselves. Note that the functions ''lower'' will be used so duplicates like Evidence Point and Evidence point will be found and ''trim'' will find " Active" and "Active".
<pre>
SELECT
lower(trim("translation".keyvalue)),
"public"."translation"."language",
Count("public"."translation".translation_guid),
"public"."translation".field_guid
FROM
"public"."translation"
where language = 'en'
GROUP BY
lower(trim("translation".keyvalue)),
"public"."translation"."language",
"public"."translation".field_guid
HAVING
Count("public"."translation".translation_guid) > 1
order by 1
</pre>

The upgrade scripts add new values to the table translation e.g. ''CHA''. Since all countries may have different duplicates there is no fit-all solution and therefore the duplicates translations are best fixed manually in Navicat and DIM. <br/>

# You need do the steps below until you have no duplicates ('''mandatory''')
# Open table ''translation'' with Navicat and sort on ''keyvalue''
# Compare with table ''imsmaenum'' e.g. should it be Evidence Point or Evidence point? Delete the row that should not exist.
# In same cases it should be field specific translation and that could be easiest to do via DIM.
# Repeat 3 - 4 until all are done and run the query again as double-check of no duplicates remain.

{{NavBox Upgrade}}
[[Category:NoPublic]]
[[Category:SQL Queries]]
[[Category:NAA]]
6,632
edits