AS SELECT DDCLElement.Name
FROM DDCLElement 
WHERE 
 DDCLElement.DdsTypeId=4
 AND DDCLElement.Id IN (SELECT * FROM #numeric_param_temp) 
 AND DDCLElement.id not in (
 	select distinct DDCLElementChild.id
 	FROM DDCLElement 
	INNER JOIN DDCLValue ON DDCLElement.Id=DDCLValue.ElementId 
	INNER JOIN DDCLProperty ON DDCLValue.PropertyId=DDCLProperty.Id 
	INNER JOIN DDCLElement AS DDCLElementChild ON DDCLValue.ReferenceName=DDCLElementChild.Name 
		AND DDCLValue.ReferenceDdsTypeId=DDCLElementChild.DdsTypeId 
	WHERE DDCLElement.DdsTypeId IN (11,16,26,27,28)
	AND DDCLElementChild.Id IN (SELECT * FROM #numeric_param_temp) 
	AND DDCLValue.ReferenceDdsTypeId=4
	AND DDCLValue.ValueTypeId in (2,4) 
	AND DDCLElement.islocal='false'
	AND DDCLProperty.Name='PROCESSING-STRUCTURE' 	
 )
ORDER BY DDCLElement.Name 