dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20190
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9114: Sql
------------------------------------------------------------
revno: 9114
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-11-23 15:57:04 +0100
message:
Sql
modified:
resources/sql/integritychecks.sql
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'resources/sql/integritychecks.sql'
--- resources/sql/integritychecks.sql 2012-10-01 13:09:49 +0000
+++ resources/sql/integritychecks.sql 2012-11-23 14:57:04 +0000
@@ -133,9 +133,12 @@
select * from categoryoptioncombo where categoryoptioncomboid not in (select distinct categoryoptioncomboid from datavalue);
--- Search for anomalies in category option combo sort order (might cause nulls)
+-- Category combo and option combo overview
-select * from categoryoptioncombos_categoryoptions order by categoryoptioncomboid, sort_order;
+select c.name as categorycombo, n.categoryoptioncomboname, n.categoryoptioncomboid from _categoryoptioncomboname n
+join categorycombos_optioncombos co on (n.categoryoptioncomboid=co.categoryoptioncomboid)
+join categorycombo c on (co.categorycomboid=c.categorycomboid)
+order by c.name, n.categoryoptioncomboname;
-- Get category combinations without data elements