← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2167: Changed "USING" to "ON"

 

------------------------------------------------------------
revno: 2167
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2010-11-25 15:40:35 +0700
message:
  Changed "USING" to "ON"
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/AbstractImporter.java


--
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 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java	2010-11-24 09:49:54 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java	2010-11-25 08:40:35 +0000
@@ -145,7 +145,7 @@
             statementBuilder.encode( organisationUnit.getName() ) + " AS sourcename, " + 
             statementBuilder.encode( categoryOptionCombo.getName() ) + " AS categoryoptioncomboname " + //TODO join?
             "FROM period AS pe " +
-            "JOIN periodtype AS pt USING (periodtypeid) " +
+            "JOIN periodtype AS pt ON (pe.periodtypeid = pt.periodtypeid) " +
             "WHERE periodid IN (" + periodIds + ") " +
             "AND periodtypeid='" + dataElement.getPeriodType().getId() + "' " +
             "AND periodid NOT IN ( " +
@@ -179,13 +179,13 @@
             "dv.storedby, dv.lastupdated, dv.comment, dv.followup, mm.minvalue, mm.maxvalue, de.name AS dataelementname, " +
             "pe.startdate, pe.enddate, pt.name AS periodtypename, ou.name AS sourcename, cc.categoryoptioncomboname " +
             "FROM datavalue AS dv " +
-            "LEFT JOIN minmaxdataelement AS mm using (sourceid, dataelementid, categoryoptioncomboid) " +
-            "JOIN dataelement AS de using (dataelementid) " +
-            "JOIN period AS pe using (periodid) " +
-            "JOIN periodtype AS pt using (periodtypeid) " +
-            "JOIN source AS sr using (sourceid) " +
-            "LEFT JOIN organisationunit AS ou on ou.organisationunitid=sr.sourceid " +
-            "LEFT JOIN _categoryoptioncomboname AS cc using (categoryoptioncomboid) " +
+            "LEFT JOIN minmaxdataelement AS mm ON (dv.sourceid = mm.sourceid AND dv.dataelementid = mm.dataelementid AND dv.categoryoptioncomboid = mm.categoryoptioncomboid) " +
+            "JOIN dataelement AS de ON (dv.dataelementid = de.dataelementid) " +
+            "JOIN period AS pe ON (dv.periodid = pe.periodid) " +
+            "JOIN periodtype AS pt ON (pe.periodtypeid = pt.periodtypeid) " +
+            "JOIN source AS sr ON (dv.sourceid = sr.sourceid) " +
+            "LEFT JOIN organisationunit AS ou ON (ou.organisationunitid = sr.sourceid) " +
+            "LEFT JOIN _categoryoptioncomboname AS cc ON (dv.categoryoptioncomboid = cc.categoryoptioncomboid) " +
             "WHERE dv.followup=true";
         
         try

=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/AbstractImporter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/AbstractImporter.java	2010-05-29 16:06:56 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/AbstractImporter.java	2010-11-25 08:40:35 +0000
@@ -100,7 +100,7 @@
                         importDataValueBatchHandler.addObject( value );
                     }
                     else // Using ImportObjectService
-                    {                
+                    {
                         importObjectService.addImportObject( NEW, groupMemberType, object );
                     }
                 }