- select += > - "cast(dv.value as double precision) " + > + select += valueExpression + " " + > "from datavalue dv " + > "left join _organisationunitgroupsetstructure ougs on > dv.sourceid=ougs.organisationunitid " + > "left join _orgunitstructure ous on > dv.sourceid=ous.organisationunitid " + > "left join _period_no_disaggregation_structure ps on > dv.periodid=ps.periodid " + > "left join dataelement de on > dv.dataelementid=de.dataelementid " + > "left join period pe on dv.periodid=pe.periodid " + > - "where de.valuetype='int' and pe.startdate >= '2011-10-01'"; > + "where de.valuetype='" + valueType + "' and pe.startdate >= > '2011-10-01'"; > > Hvis dette er noe du gjør for hver datavalue.. så kan det være noe å vinne om du bruker en StringBuilder...
> final String sql = insert + select; > > log.info( "Populate SQL: "+ sql ); > > jdbcTemplate.execute( sql ); > - > - log.info( "Populated analytics table" ); > } > > public List<String[]> getDimensionColumns() > > > _______________________________________________ > Mailing list: https://launchpad.net/~dhis2-devs > Post to : [email protected] > Unsubscribe : https://launchpad.net/~dhis2-devs > More help : https://help.launchpad.net/ListHelp > >
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : [email protected] Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp

