Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-25 Thread Brajesh Murari
ks > > Ed > > > > *From:* Knut Staring > *Sent:* Sunday, 24 June 2018 8:36 PM > *To:* Edward Robinson > *Cc:* David Huser ; DHIS 2 developers < > dhis2-devs@lists.launchpad.net> > *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in > datavalues

Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-25 Thread Edward Robinson
Understood, thanks everyone, Regards Ed From: Calle Hedberg Sent: Monday, 25 June 2018 1:44 AM To: Brajesh Murari Cc: Edward Robinson ; DHIS 2 developers Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table Hi, Incorrect - the term "sourceid" has never

Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-25 Thread Edward Robinson
Ah, got it, makes sense, Thanks Ed From: Knut Staring Sent: Sunday, 24 June 2018 8:36 PM To: Edward Robinson Cc: David Huser ; DHIS 2 developers Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table This is an unfortunate relic in a few key tables. Dates back to

Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-24 Thread Calle Hedberg
David Huser >> *Sent:* Tuesday, 19 June 2018 2:33 PM >> *To:* Edward Robinson >> *Cc:* DHIS 2 Developers list >> *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in >> datavalues table >> >> >> >> Hi Ed, >> >> T

Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-24 Thread Knut Staring
esent in the datavalue table. Do you know the > reason it’s called sourceid? > > Ed > > > > *From:* David Huser > *Sent:* Tuesday, 19 June 2018 2:33 PM > *To:* Edward Robinson > *Cc:* DHIS 2 Developers list > *Subject:* Re: [Dhis2-devs] Getting the OU for items

Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-24 Thread Brajesh Murari
id? > > Thanks for the quick response David. For some reason I was expecting > organisationunitid to be present in the datavalue table. Do you know the > reason it’s called sourceid? > > Ed > > > > *From:* David Huser > *Sent:* Tuesday, 19 June 2018 2:33 PM >

Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-20 Thread Edward Robinson
Thank you Brajesh, Ed From: Brajesh Murari Sent: Tuesday, 19 June 2018 4:47 PM To: Edward Robinson Cc: David Huser ; DHIS 2 developers Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table sourceid is available for distinguishing different types of organizationunit

Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-19 Thread Brajesh Murari
gt; > > > *From:* David Huser > *Sent:* Tuesday, 19 June 2018 2:33 PM > *To:* Edward Robinson > *Cc:* DHIS 2 Developers list > *Subject:* Re: [Dhis2-devs] Getting the OU for items recorded in > datavalues table > > > > Hi Ed, > > This should get you started:

Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-19 Thread Edward Robinson
Robinson Cc: DHIS 2 Developers list Subject: Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table Hi Ed, This should get you started: SELECT dv.dataelementid, dv.value, ou.name<http://ou.name> FROM datavalue dv JOIN organisationunit ou ON ou.organisationunitid = dv.so

Re: [Dhis2-devs] Getting the OU for items recorded in datavalues table

2018-06-19 Thread David Huser
Hi Ed, This should get you started: SELECT dv.dataelementid, dv.value, ou.name FROM datavalue dv JOIN organisationunit ou ON ou.organisationunitid = dv.sourceid; Best, David On Tue, Jun 19, 2018 at 2:21 PM Edward Robinson < erobin...@projectbalance.com> wrote: > How can the OU be determined fo