SELECT items.item_number
,itemcats.category_id
,itemcats.sequence_number
,itemcats.alt_item_cat_code
,ect.description
,ect.category_name
FROM egp_item_cat_assignments itemcats
,egp_category_sets_b catsets
,egp_system_items_b items
,inv_org_parameters org
,egp_categories_tl ect
WHERE catsets.category_set_id = itemcats.category_set_id
AND items.inventory_item_id = itemcats.inventory_item_id
AND org.organization_id = items.organization_id
AND itemcats.category_id=ect.category_id
AND ( ( catsets.control_level = 1
AND itemcats.organization_id = org.master_organization_id
)
OR ( catsets.control_level = 2
AND itemcats.organization_id = org.organization_id
)
)
No comments:
Post a Comment