Dear Dhis2 users how can i delete?

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=<id>;
delete from datavalue where dataelementid=<id>;

"Replace" is not a command, just Lars telling you to change the <id> in the
two commands above with the real IDs of your data elements.

Seems all is fine then. You can now try deleting the data elements from the
DHIS 2 user interface.

Ola
------

----------------------------------
Ola Hodne Titlestad (Mr)
HISP
Department of Informatics
University of Oslo

Mobile: +47 48069736
Home address: Vetlandsvn. 95B, 0685 Oslo, Norway. Googlemaps
link<http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Vetlandsvn.+95B,+0685+Oslo,+Norway&gt;

2011/9/12 Muhire Andrew <muhireandrew@yahoo.com>

Thanks for the quick help,
i have successfully used the select and delete steps
(in datavalues and datavalue_audit)
but using replace <id> 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 to use replace but am getting syntax
error!
waiting for your help dear team!

------------------------------

*Muhire Andrew
*
*HMIS/Ministry of Health*
*andrew.muhire@moh.gov.rw*
*God is my provider.*

------------------------------
*From:* Lars Helge Øverland <larshelge@gmail.com>
*To:* Muhire Andrew <muhireandrew@yahoo.com>
*Cc:* dhis2-devs@lists.launchpad.net; dhis2-users@lists.launchpad.net
*Sent:* Monday, September 12, 2011 3:51 PM
*Subject:* Re: Dear Dhis2 users how can i delete?

Hi Andrew,

you need to remove the data with SQL in the database. Run:

delete from datavalue_audit where dataelementid=<id>;
delete from datavalue where dataelementid=<id>;

and replace <id> with the dataelementid of the one you want to remove.

You can then go ahead and delete the data element in the user interface.

Lars

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help