Dear john, If you have access at the backend(server side) you might need to create view of that trackedentityattributevalue like create view te_trackedentutyattributevalue as select * from trackedentityattributevalue;
And hence use view created in your sql Thanks On Tue, 11 Sep 2018, 4:54 p.m. , <john.bidem...@gmail.com> wrote: > Hello everyone, > > > > I am having an issue creating a SQL view from the DHIS2 using this query. > > > > SELECT DISTINCT public._orgunitstructure.uidlevel4 AS UID4, > public._organisationunitgroupsetstructure.organisationunitname AS name4, > public._orgunitstructure.uidlevel5 AS UID5, public.organisationunit.name > AS orgUnitName, public.organisationunit.hierarchylevel AS orgUnitLevel, > public.trackedentityattributevalue.value AS woman, > public.trackedentityinstance.uid AS womanuid, > public.trackedentityinstance.created AS womancreationdate, > public.trackedentityinstance.lastupdated AS womanupdated > > FROM public.trackedentityattribute > > INNER JOIN public.trackedentityattributevalue ON > (public.trackedentityattribute.trackedentityattributeid = > public.trackedentityattributevalue.trackedentityattributeid) > > INNER JOIN public.trackedentityinstance ON > (public.trackedentityattributevalue.trackedentityinstanceid = > public.trackedentityinstance.trackedentityinstanceid) > > INNER JOIN public.organisationunit ON > (public.trackedentityinstance.organisationunitid = > public.organisationunit.organisationunitid) > > LEFT JOIN public._orgunitstructure ON public._orgunitstructure.uidlevel5 = > public.organisationunit.uid > > LEFT JOIN public._organisationunitgroupsetstructure ON > public._organisationunitgroupsetstructure.organisationunitid = > public.organisationunit.parentid > > WHERE public.trackedentityattribute.name = 'Name of Member' > > > > > > Please, any advice on how to go about this. > > > > Thanks > > John > _______________________________________________ > 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 >
_______________________________________________ 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