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.



________________________________
From: Knut Staring <knu...@gmail.com>
To: Lars Helge Øverland <larshe...@gmail.com>
Cc: Muhire Andrew <muhireand...@yahoo.com>; dhis2-users@lists.launchpad.net; 
dhis2-d...@lists.launchpad.net
Sent: Monday, September 12, 2011 3:56 PM
Subject: Re: [Dhis2-devs] Dear Dhis2 users how can i delete?


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


Knut


2011/9/12 Lars Helge Øverland <larshe...@gmail.com>

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: https://launchpad.net/~dhis2-devs
>Post to     : dhis2-d...@lists.launchpad.net
>Unsubscribe : https://launchpad.net/~dhis2-devs
>
>More help   : https://help.launchpad.net/ListHelp
>


-- 

Knut Staring
Informatics, U. of Oslo
http://hisp.uio.no
+4791880522
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to