Difference between revisions of "Duplicate Enumvalue"
From IMSMA Wiki
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{Warning | Duplicate enumvalues will cause import problems that are difficult to detect because there is no error message. }} | {{Warning | Duplicate enumvalues will cause import problems that are difficult to detect because there is no error message. }} | ||
| − | {{Note | The import problem will also | + | {{Note | The import problem will also happen in cases where one enumeration value is active and the other are inactive. The import problem does not apply to CDFs. }} |
| − | If this SQL gives a result set, contact your GICHD IM advisor: | + | If this SQL gives a result set, contact your [[Information Management Team | GICHD IM advisor]]: |
<pre> | <pre> | ||
SELECT | SELECT | ||
imsmaenum.enumcategory, | imsmaenum.enumcategory, | ||
imsmaenum.enumvalue, | imsmaenum.enumvalue, | ||
| − | COUNT (imsmaenum.imsmaenum_guid) | + | COUNT(imsmaenum.imsmaenum_guid) |
FROM | FROM | ||
imsmaenum | imsmaenum | ||
| Line 14: | Line 14: | ||
imsmaenum.enumvalue | imsmaenum.enumvalue | ||
HAVING | HAVING | ||
| − | COUNT ( | + | COUNT(imsmaenum.imsmaenum_guid) > 1 |
| − | |||
| − | |||
ORDER BY | ORDER BY | ||
imsmaenum.enumcategory ASC, | imsmaenum.enumcategory ASC, | ||
| Line 25: | Line 23: | ||
[[Category:SQL Queries]] | [[Category:SQL Queries]] | ||
[[Category:NAA]] | [[Category:NAA]] | ||
| + | [[Category:Known Issues]] | ||
Latest revision as of 18:25, 17 June 2017
| |
Duplicate enumvalues will cause import problems that are difficult to detect because there is no error message. |
| |
The import problem will also happen in cases where one enumeration value is active and the other are inactive. The import problem does not apply to CDFs. |
If this SQL gives a result set, contact your GICHD IM advisor:
SELECT
imsmaenum.enumcategory,
imsmaenum.enumvalue,
COUNT(imsmaenum.imsmaenum_guid)
FROM
imsmaenum
GROUP BY
imsmaenum.enumcategory,
imsmaenum.enumvalue
HAVING
COUNT(imsmaenum.imsmaenum_guid) > 1
ORDER BY
imsmaenum.enumcategory ASC,
imsmaenum.enumvalue ASC