Re: [Dhis2-users] [Dhis2-devs] Removing Organization Units

2015-10-01 Thread gerald thomas
Dear Jason, Thanks for help Regards, Gerald On Oct 1, 2015 5:07 PM, "Jason Pickering" wrote: > Hi Gerald, > > > Removal of orgunits with associated reports or charts is non trivial, due > to the use of the "sort_order" in these resources. It will cause a null > pointer exception if you just del

Re: [Dhis2-users] [Dhis2-devs] Removing Organization Units

2015-10-01 Thread Jason Pickering
Hi Gerald, Removal of orgunits with associated reports or charts is non trivial, due to the use of the "sort_order" in these resources. It will cause a null pointer exception if you just delete the orgunit. I have added two functions to the dhis2-utils repo, which handle the deletion and merging

Re: [Dhis2-users] [Dhis2-devs] Removing Organization Units

2015-10-01 Thread gerald thomas
Dear Bob, Thanks very much for your help. Will get back to you with feedback. Regards, Gerald On Oct 1, 2015 4:49 PM, "Bob Jolliffe" wrote: > Gerald you would need to do this with an sql delete command. Before > you do you should be 100% sure that you do really want to delete the > data - maybe

Re: [Dhis2-users] [Dhis2-devs] Removing Organization Units

2015-10-01 Thread Bob Jolliffe
Gerald you would need to do this with an sql delete command. Before you do you should be 100% sure that you do really want to delete the data - maybe make a backup first. You need to find the primary key (organisationunitid) of the orgunit you want to delete. Say it is 5677 Then: DELETE FROM da

Re: [Dhis2-users] [Dhis2-devs] Removing Organization Units

2015-10-01 Thread Dapo Adejumo
Hi Gerald, You can run this command in the db - DELETE FROM datavalue WHERE sourceid = 'X'; Replace X with the orgunit id. Hope that helps. ……… Regards, Dapo Adejumo +2348033683677 Skype : dapojorge - Original Message - From: "gerald thomas" To: "Dapo Adejumo"

Re: [Dhis2-users] [Dhis2-devs] Removing Organization Units

2015-10-01 Thread gerald thomas
Dear Dapo, What is the command to remove those data from the database as per organisation unit? Please help me. Regards, Gerald On Oct 1, 2015 16:16, "Dapo Adejumo" wrote: > Hi Gerald, > What error are you getting? > If you have data associated with these org units, you will not be able to > rem

Re: [Dhis2-users] [Dhis2-devs] Removing Organization Units

2015-10-01 Thread Dapo Adejumo
Hi Gerald, What error are you getting? If you have data associated with these org units, you will not be able to remove them until you delete the data in the database (even if you have removed the datasets). ……… Regards, Dapo Adejumo +2348033683677 Skype : dapojorge - Origi