I don't have ready made statements at hand. But here is what you need to do - FOR THE TRACKED ENTITY INSTANCE in question
1. Delete event values from trackedentitydatavalue 2. Delete events from programstageinstance 3. Delete enrollments from programinstance 4. Delete attribute values from trackedentityattributevalue 5. Delete the instance from trackedentityinstance More on the associations: trackedentityinstance uid -> trackedentityinstance id -> programinstance id -> programstageinstance id -- Abyot A. Gizaw. Senior Engineer, DHIS2 University of Oslo http://www.dhis2.org On Thu, Nov 3, 2016 at 10:27 AM, Stanley Kalyati <skaly...@gmail.com> wrote: > Abyot, > > Could you help with the sql statements? > > Thanks in advance. > > Stanley > > On Thu, Nov 3, 2016 at 11:22 AM, Abyot Asalefew Gizaw <ab...@dhis2.org> > wrote: > >> Hi Stanley, >> >> It is only version 2.25 that has UI support for deleting Tracked Entity >> Instance. For the other versions, one has to do it manually using sql >> statements. >> >> -- >> Abyot A. Gizaw. >> Senior Engineer, DHIS2 >> University of Oslo >> http://www.dhis2.org >> >> On Thu, Nov 3, 2016 at 10:16 AM, Stanley Kalyati <skaly...@gmail.com> >> wrote: >> >>> Colleagues, >>> >>> My colleague entered a tracked entity in a wrong OU and i want to delete >>> that.Can someone tell me how to delete this entity? or move this entity to >>> another OU. >>> >>> You usual support is always appreciated. >>> >>> Stanley >>> >>> >>> _______________________________________________ >>> Mailing list: https://launchpad.net/~dhis2-users >>> Post to : dhis2-us...@lists.launchpad.net >>> Unsubscribe : https://launchpad.net/~dhis2-users >>> More help : https://help.launchpad.net/ListHelp >>> >>> >> >
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp