Duplicate Enumvalue SQL: Difference between revisions

From IMSMA Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(3 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 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 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, your country may had a undetected problem also during 5.x:
If this SQL gives a result set, your country may have had an undetected problem also during 5.x:
<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
                imsmaenum.imsmaenum_guid
        ) > 1
ORDER BY
ORDER BY
         imsmaenum.enumcategory ASC,
         imsmaenum.enumcategory ASC,
Line 22: Line 20:
</pre>  
</pre>  


(any change here must be done on the public page too)
{{note|any change here must be done on the [[Duplicate_Enumvalue|public page]] too}}
 
{{NavBox Upgrade}}
{{NavBox Upgrade}}
[[Category:SQL Queries]]
[[Category:SQL Queries]]
[[Category:NAA]]
[[Category:NAA]]
[[Category:NoPublic]]
[[Category:NoPublic]]

Latest revision as of 18:26, 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, your country may have had an undetected problem also during 5.x:

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
any change here must be done on the public page too

{{#switch:|subgroup|child=|none=|#default=

}}{{#if:|}}{{#if:Upgrade Process|<td style="text-align:left;border-left-width:2px;border-left-style:solid;|{{#if:|}}}}{{#if:|{{#if:IMSMA Hub{{#switch:{{#if:|{{{border}}}|child}}|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:{{#if:|{{{border}}}|child}}|child||{{#ifeq:{{#if:|{{{border}}}|child}}|subgroup||{{#switch:duplicate enumvalue sql

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}|}}{{#if:|{{{group2}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list2}}}

}}{{#if:|{{#if:IMSMA Hub{{#switch:{{#if:|{{{border}}}|child}}|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:{{#if:|{{{border}}}|child}}|child||{{#ifeq:{{#if:|{{{border}}}|child}}|subgroup||{{#switch:duplicate enumvalue sql

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}|}}{{#if:|{{{group3}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list3}}}

}}{{#if:|{{#if:|{{{group4}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list4}}}

}}{{#if:|{{#if:|{{{group5}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list5}}}

}}{{#if:|{{#if:|{{{group6}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list6}}}

}}{{#if:|{{#if:|{{{group7}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list7}}}

}}{{#if:|{{#if:|{{{group8}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list8}}}

}}{{#if:|{{#if:|{{{group9}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list9}}}

}}{{#if:|{{#if:|{{{group10}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list10}}}

}}{{#if:|{{#if:|{{{group11}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list11}}}

}}{{#if:|{{#if:|{{{group12}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list12}}}

}}{{#if:|{{#if:|{{{group13}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list13}}}

}}{{#if:|{{#if:|{{{group14}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list14}}}

}}{{#if:|{{#if:|{{{group15}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list15}}}

}}{{#if:|{{#if:|{{{group16}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list16}}}

}}{{#if:|{{#if:|{{{group17}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list17}}}

}}{{#if:|{{#if:|{{{group18}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list18}}}

}}{{#if:|{{#if:|{{{group19}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list19}}}

}}{{#if:|{{#if:|{{{group20}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list20}}}

}}{{#if:|{{#if:IMSMA Hub{{#switch:{{#if:|{{{border}}}|child}}|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:{{#if:|{{{border}}}|child}}|child||{{#ifeq:{{#if:|{{{border}}}|child}}|subgroup||{{#switch:duplicate enumvalue sql

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}|}}

{{{below}}}

}}{{#switch:|subgroup|child=

|none=|#default=}}{{#ifeq:|Template|{{#ifeq:|child||{{#ifeq:|subgroup||{{#switch:duplicate enumvalue sql
|doc
|sandbox
|testcases =
|#default = {{#switch:hlist
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}