 
 
 Adel Abdallah
-Updated May 17, 2018
+Updated May 21, 2018
 
 */
 
-SELECT  DISTINCT ResourceTypeAcronymPurpose,InstanceNamePurpose ,DescriptorValuePurpose,ResourceTypeAcronymState,InstanceNameState,DescriptorValueState
+SELECT  DISTINCT ResourceTypeAcronymPurpose,InstanceNamePurpose CategoricalvaluePurpose,ResourceTypeAcronymState,InstanceNameState,CategoricalvalueState
 
 FROM
 
 (
 ----------------------
 
-SELECT ResourceTypeAcronym AS ResourceTypeAcronymState,InstanceName As InstanceNameState ,descriptorvalue As DescriptorValueState
+SELECT ResourceTypeAcronym AS ResourceTypeAcronymState,InstanceName As InstanceNameState ,Categoricalvalue As CategoricalvalueState
 
 
 FROM ResourceTypes


AND (Attributes.AttributeName ='PURPOSE' or Attributes.AttributeName ='SYMBOL')

AND descriptorvalue='H'

)


LEFT JOIN CategoricalValues
ON CategoricalValues.ValuesMapperID=ValuesMapper.ValuesMapperID

LEFT JOIN CV_Categorical
ON CV_Categorical.Name=CategoricalValues.CategoricalValueCV	


-- Specifiy controlled Object Type, instance name, and an attribute of interest
