Re: [Dhis2-users] Dear Dhis2 users how can i delete?

2011-09-12 Thread Muhire Andrew
Great, thanks Ola for the clarification. On Mon Sep 12th, 2011 11:58 AM PDT Ola Hodne Titlestad wrote: >Hi, > >The only two commands you should run on your database are the two delete >statements; >delete from datavalue_audit where dataelementid=; >delete from datavalue where dataelementid=; > >"

Re: [Dhis2-users] Dear Dhis2 users how can i delete?

2011-09-12 Thread Ola Hodne Titlestad
Hi, The only two commands you should run on your database are the two delete statements; delete from datavalue_audit where dataelementid=; delete from datavalue where dataelementid=; "Replace" is not a command, just Lars telling you to change the in the two commands above with the real IDs of yo

Re: [Dhis2-users] help me on how to use replace syntax

2011-09-12 Thread Knut Staring
Hi Andrew, There seems to be some confusion: You need to "replace" in the SQL statement before you run it. In order to find the right ID that should form part of the DELETE statement, you need to look at the dataelement table in your database, and e.g. run something like "SELECT dataelementid FROM

Re: [Dhis2-users] help me on how to use replace syntax

2011-09-12 Thread Jason Pickering
Can you paste the exact query which you are using? On Mon, Sep 12, 2011 at 5:04 PM, Muhire Andrew wrote: > Thanks for the quick help, > i have successfully used the select and delete steps > (in datavalues and datavalue_audit) > but using replace is not working on my side may be am not using

[Dhis2-users] help me on how to use replace syntax

2011-09-12 Thread Muhire Andrew
Thanks for the quick help, i have successfully used the select and delete steps(in datavalues and datavalue_audit) but using replace is not working on my side may be am not using it well? please update me again (only replace syntax). i have deleted data from my data element x and next step was

Re: [Dhis2-users] Dear Dhis2 users how can i delete?

2011-09-12 Thread Muhire Andrew
Thanks for the quick help, i have successfully used the select and delete steps(in datavalues and datavalue_audit) but using replace is not working on my side may be am not using it well? please update me again (only replace syntax). i have deleted data from my data element x and next step was

Re: [Dhis2-users] [Dhis2-devs] Dear Dhis2 users how can i delete?

2011-09-12 Thread Jason Pickering
It is best practice in all cases to ensure to you make a backup of your database. Even with SELECT and DELETE, you may unknowingly make a typing mistake. Anytime you start messing around with the database directly, ensure you first make a backup, so that you can easily restore the database in case

Re: [Dhis2-users] [Dhis2-devs] Dear Dhis2 users how can i delete?

2011-09-12 Thread Muhire Andrew
Thank you all, Great Knut its rilly good to select first and then delete because it can cause problems in case i delete  the needed data.   Muhire Andrew HMIS/Ministry of Health andrew.muh...@moh.gov.rw God is my provider. ___

Re: [Dhis2-users] Dear Dhis2 users how can i delete?

2011-09-12 Thread Muhire Andrew
Thanx Lars for the quick help.   Muhire Andrew HMIS/Ministry of Health andrew.muh...@moh.gov.rw God is my provider. From: Lars Helge Øverland To: Muhire Andrew Cc: dhis2-d...@lists.launchpad.net; dhis2-users@lists.launch

Re: [Dhis2-users] [Dhis2-devs] Dear Dhis2 users how can i delete?

2011-09-12 Thread Knut Staring
As a rule of thumb, it is usually wise to do a SELECT before a DELETE, so that you are 100% sure you are not deleting data you really need. In this case: select * from datavalue_audit where dataelementid=; select * from datavalue where dataelementid=; Knut 2011/9/12 Lars Helge Øverland > Hi A

Re: [Dhis2-users] Dear Dhis2 users how can i delete?

2011-09-12 Thread Lars Helge Øverland
Hi Andrew, you need to remove the data with SQL in the database. Run: delete from datavalue_audit where dataelementid=; delete from datavalue where dataelementid=; and replace with the dataelementid of the one you want to remove. You can then go ahead and delete the data element in the user in

[Dhis2-users] Dear Dhis2 users how can i delete?

2011-09-12 Thread Muhire Andrew
Dear all, how can i delete a data element with data inside? On Thu Sep 8th, 2011 1:03 AM PDT Lars Helge Øverland wrote: >Hi all, > >since DHIS 2.4 was released on Aug 28. it has been used in production >in Kenya and Ghana. In that regard we have received lots of feedback >and done a range of impr