27: UNION ALL
28: SELECT we.primary_item_id,wrs.bom_revision
29: FROM wip_transactions wt,
30: wip_repetitive_schedules wrs,
31: wip_entities we
32: WHERE wt.transaction_date between p_from_date
33: and p_to_Date
34: AND wt.wip_entity_id = wrs.wip_entity_id
35: AND wt.wip_entity_id = we.wip_entity_id