Project

General

Profile

bug #8790

Updated by Andreas Müller about 4 years ago

This is how to find them: 

 ~~~ 
 SELECT f.id featureId, f.titleCache, mu.id unitId, mu.titleCache unit,    deb.* 
 FROM DescriptionElementBase deb INNER JOIN DefinedTermBase f ON f.id = deb.feature_id 
 LEFT OUTER JOIN DefinedTermBase_MeasurementUnit MN ON MN.feature_id = f.id 
 LEFT OUTER JOIN DefinedTermBase mu ON mu.id = MN.recommendedmeasurementunits_id 
 WHERE deb.DTYPE = 'QuantitativeData' AND deb.unit_id IS NULL AND mu.id IS NOT NULL  
 ORDER BY f.id 
 ~~~ 

 For updating per feature 
 ~~~ sql 
 UPDATE DescriptionElementBase deb 
 SET deb.unit_id = xxx 
 WHERE deb.feature_id = yyy 
 ~~~ 

 Beside fixing immediately we should also have an update script.

Back