← Back to team overview

dhis2-users team mailing list archive

Re: Get Date Values

 

Dear Walu, see the SQL below, you can see the number of tables related with data value table. 

..........................................
SELECT de.uid, de.name, ps.iso, dv.sourceid, org.name AS OrgUnit, 
dv.categoryoptioncomboid AS categoryoptioncombo, cat.uid AS categoryoptioncomboUID, dv.value

FROM datavalue dvinner join dataelement de ON de.dataelementid=dv.dataelementid
inner join period pe ON pe.periodid=dv.periodid
inner join _periodstructure ps ON dv.periodid=ps.periodid
inner join organisationunit org ON org.organisationunitid=dv.sourceid
inner join categoryoptioncombo cat ON cat.categoryoptioncomboid = dv.categoryoptioncomboid

WHERE ps.iso='201801' AND org.uid='oBI1EjCjKgq' AND de.name='IPD_Death'
 
..............................
Regards
Sele
    On Thursday, August 16, 2018, 9:54:17 AM GMT+3, Walusiku Muyunda <jomuwalu@xxxxxxxxx> wrote:  
 
 Hello,
We recently implemented DHIS2 for our data collection needs and are currently looking at the first data submitted. Am just getting used to the table structure and need help on where the Data Set data entry dates/periods are saved. In the datavalue table I have a field periodid but cant seem to find what table to link it to to get the actual dates. the period and periodtype tables dont seem to have the actual dates when the data was being reported. Please help.
Thank you.
Walusiku J. Muyunda

"We have heaven to win and hell to shun, our lives testify better!"
_______________________________________________
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
  

Follow ups

References