Difference between revisions of "Duplicate Enumvalue"

From IMSMA Wiki
Jump to: navigation, search
(Created page with "{{Warning | Duplicate enumvalues will cause import problems that are difficult to detect because there is no error message. }} {{Note | The import problem will also occur in c...")
 
Line 2: Line 2:
 
{{Note | The import problem will also occur in cases where one enumvalue is active and the others are inactive. The import problem does not apply to CDFs. }}
 
{{Note | The import problem will also occur in cases where one enumvalue is active and the others are inactive. The import problem does not apply to CDFs. }}
  
 +
If this SQL gives a result set, contact your GICHD IM advisor:
 +
<pre>
 +
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
 +
</pre>
 
   
 
   
 
{{NavBox Technical Notes}}
 
{{NavBox Technical Notes}}
 
+
[[Category:SQL Queries]]
 
[[Category:NAA]]
 
[[Category:NAA]]

Revision as of 21:11, 5 July 2014

Warning.jpg Duplicate enumvalues will cause import problems that are difficult to detect because there is no error message.
Note.jpg The import problem will also occur in cases where one enumvalue is active and the others 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