dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #09857
Re: Exporting data through SQL View
Hi Tantely,
You are probably looking for the datasetmembers table and the datasetsource
table (confusingly and historically, orgunits used to be referred to as
sources, and this is still reflected in a few places).
When you say data elements, I assume you mean data values? If so, then
something along the lines of the query below (though this didnt work for me
right now
SELECT de.name, dv.value FROM datavalue dv NATURAL JOIN dataelement de
NATURAL JOIN datasetmembers dsm NATURAL JOIN datasetsource dss
On Fri, Apr 1, 2016 at 12:29 AM, Raminosoa Rabemanantsoa, Tantely <
traminosoa@xxxxxxxxxx> wrote:
> Dear DHIS2 users,
>
>
> I would like to export all data elements related to all organization units
> linked to a data set (questionnaire) on a specific period through the SQL
> View. Does anyone have some idea of on which table (/tables) should I make
> the SQL select script in DHIS2? The reason is that I have already exported
> the data through the “data export” (csv) but it returned me data values
> along columns and I need to transpose in Excel each Organization Unit to
> have data values aligned by row.
>
>
> Thank you for your suggestions.
>
>
> Best Regards,
>
>
> Tantely
>
> *This message and its attachments are confidential and solely for the
> intended recipients. If received in error, please delete them and notify
> the sender via reply e-mail immediately.*
> _______________________________________________
> 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
Norway: +4791880522
Skype: knutstar
http://dhis2.org
Follow ups
References