← Back to team overview

dhis2-users team mailing list archive

Re: Pruning the OU hierarchy

 

Try this

https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/delete_orgunittree_with_data.sql

which will prune an entire branch of the orgunit tree.

Regards,
Jason


On Tue, Dec 5, 2017 at 9:07 AM, Knut Staring <knutst@xxxxxxxxx> wrote:

> Hi everyone,
>
> Are there some easy ways of pruning an OrgUnit tree?
>
> Basically, I have a number of countries with varying numbers of
> subnational levels, but am only interested in one of the countries. I guess
> in previous DHIS2 versions I could have done a detailed metadata export.
> What would be a quick way to prune now?
>
> Knut
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049

Follow ups

References