← Back to team overview

dhis2-devs team mailing list archive

Re: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 9257: Analytics table, bool data

 

-        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     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

References