select papers.object_id as OBJECT_ID,papers.object_name as PAPER_NAME,
paper_usage.object_name as USAGE, year.value_, papers.created from
eav_string year,
objects papers, eav_objects stated_usage, objects paper_usage where
papers.object_class=42 and stated_usage.attribute_id=452 and
papers.object_id=stated_usage.object_id and
paper_usage.object_id=stated_usage.value_
AND year.OBJECT_ID(+) = papers.OBJECT_ID
AND year.ATTRIBUTE_ID(+) = 154
ORDER BY papers.created
|