← Back to team overview

dhis2-users team mailing list archive

Fwd: need some help

 

Replying to the list.

---------- Forwarded message ----------
From: Knut Staring <knutst@xxxxxxxxx>
Date: Fri, Jan 6, 2012 at 4:03 PM
Subject: Re: [Dhis2-users] need some help
To: Stephen Gbanyan <mambu9@xxxxxxxxx>


Hi Stephen,

You can do this in PgAdmin - but of course you really should be careful
that you only delete exactly what you want to delete.

In PgAdmin, click on the database, then click on the SQL icon in the
toolbar.

Assuming the orgunit you want to remove is ACFI Clinic, you can then run
the following query (by hitting the green arrow button):

SELECT organisationunitid, name FROM organisationunit WHERE name='ACFI
Clinic';

Now that you are certain of the organisatoinunitid (e.g. 12345), you can
replace 12345 into the following statement:

DELETE FROM datavalue WHERE sourceid=12345;

Knut








On Fri, Jan 6, 2012 at 3:27 PM, Stephen Gbanyan <mambu9@xxxxxxxxx> wrote:

> Hi Morten,
>
> Where can I go to do this?
>
> Stephen
>
> On 1/6/12, Morten Olav Hansen <mortenoh@xxxxxxxxx> wrote:
> > Hi
> >
> > This means that data has been collected for the facility you want to
> delete.
> >
> > Check the datavalue table for datavalues that have source = facilityId
> >
> > --
> > Morten
> >
> >
> >
> > On Fri, Jan 6, 2012 at 3:07 PM, Stephen Gbanyan <mambu9@xxxxxxxxx>
> wrote:
> >> Hi All,
> >>
> >> Attached is a message i get when I try to delete repeated facilities
> >> in my database. What can I do?
> >>
> >> Thanks
> >>
> >> _______________________________________________
> >> Mailing list: https://launchpad.net/~dhis2-users
> >> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> >> Unsubscribe : https://launchpad.net/~dhis2-users
> >> More help   : https://help.launchpad.net/ListHelp
> >>
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>



-- 
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522
http://dhis2.org




-- 
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522
http://dhis2.org

References