Just forwarding a query I had from Andrew to the list. I have observed this change in the _organisationgroupsetstructure table which I think might cause some grief to those who have written many direct queries against resource tables. Is it just us noticing this? Was there some change recently in the way resource table columns are named (RW just upgraded recently to 2.13)?
···
On 21 November 2013 18:50, Muhire Andrew muhireandrew@yahoo.com wrote:
Dear Bob, I don’t know if i am right but this is a sign that the datamart failed to finish aggregating these tables. Is it right Bob and Randy? check on Materialized quiries below!
- Muhire Andrew*
Ministry of Health / HMIS
““A mind is a terrible thing to waste””
** Cell:(+25)0788436150**
*** Twitter :andrewmuhire***
**** skype:muhire_andrew****
On Thursday, November 21, 2013 7:58 PM, Cron Daemon root@hmisdb.moh.gov.rw wrote:
ERROR: column _organisationunitgroupsetstructure.ownership does not exist
LINE 5: _organisationunitgroupsetstructure.ownership,^
QUERY:
INSERT INTO _view_healthfacilityhierarchy
SELECT _organisationunitgroupsetstructure.organisationunitid,
_organisationunitgroupsetstructure.organisationunitname,
_organisationunitgroupsetstructure.ownership,“O5”.name AS sector, “O6”.code AS fosaid,
_organisationunitgroupsetstructure.type,
_orgunitstructure.level,
“O4”.name AS subdistrict,
“O3”.name AS district,
“O2”.name AS province,“O6”.coordinates AS gpscoordinates,
“O6”.openingdate
FROM _orgunitstructure
INNER JOIN _organisationunitgroupsetstructure ON
_organisationunitgroupsetstructure.organisationunitid =
_orgunitstructure.organisationunitid
INNER JOIN organisationunit “O4” ON “O4”.organisationunitid =
_orgunitstructure.idlevel4
INNER JOIN organisationunit “O3” ON _orgunitstructure.idlevel3 =“O3”.organisationunitid
INNER JOIN organisationunit “O2” ON “O2”.organisationunitid =
_orgunitstructure.idlevel2
INNER JOIN organisationunit “O5” ON
_orgunitstructure.idlevel5 = “O5”.organisationunitidINNER JOIN organisationunit “O6” ON
_orgunitstructure.organisationunitid = “O6”.organisationunitid
WHERE _orgunitstructure.level = 6;
CONTEXT: PL/pgSQL function materialize_facility_views() line 29 at EXECUTE statement