Re: [Dhis2-users] Script to disassociate Orgunit with Datavalue

2018-10-11 Thread Walusiku Muyunda
Thank you. That works great. *Walusiku J. Muyunda* *Cell: +260967006614Cell: +260971000614* *Cell: +260953063387* *"We have heaven to win and hell to shun, our lives testify better!" * On Thu, Oct 11, 2018 at 4:11 PM Jason Pickering wrote: > Just load the

Re: [Dhis2-users] Script to disassociate Orgunit with Datavalue

2018-10-11 Thread Jason Pickering
Just load the script in your database and execute it with SELECT * FROM delete_site_with_data('tPR9B5xETb'); Regards, Jason On Thu, Oct 11, 2018 at 4:08 PM Walusiku Muyunda wrote: > Hi Jason, > > Please help with syntax for this line: > EXECUTE 'SELECT organisationunitid from organisationunit

Re: [Dhis2-users] Script to disassociate Orgunit with Datavalue

2018-10-11 Thread Walusiku Muyunda
Hi Jason, Please help with syntax for this line: EXECUTE 'SELECT organisationunitid from organisationunit where uid = 'tPR9B5xETb || $1 || INTO organisationunitid; Is this where I need to specify the uid? Thanks. *Walusiku J. Muyunda* *Cell: +260967006614Cell: +260971000614* *Cell

Re: [Dhis2-users] Script to disassociate Orgunit with Datavalue

2018-10-11 Thread Walusiku Muyunda
Thank you Jason, this will be very helpful. Am using v2.28 and hope the script will run without complaints. Regards. *Walusiku J. Muyunda* *Cell: +260967006614Cell: +260971000614* *Cell: +260953063387* *"We have heaven to win and hell to shun, our lives testify better!"

Re: [Dhis2-users] Script to disassociate Orgunit with Datavalue

2018-10-11 Thread Jason Pickering
Hi there! You can have a look here https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/delete_orgunit_with_data.sql which will delete the site and all object associated with it. You should supply the UID of the orgunit you wish to delete as a paramater to the Postgresql function. You

[Dhis2-users] Script to disassociate Orgunit with Datavalue

2018-10-11 Thread Walusiku Muyunda
Dear All, Is there there anyone with a script to disassociate an Orgunit from all associated programs or data sets so I can be able to delete it from within DHIS2? Thank you. *Walusiku J. Muyunda* *Cell: +260967006614Cell: +260971000614* *Cell: +260953063387* *"We have heaven to win and hel