Monday, 31 October 2011

R12 IMO Query

/* Formatted on 06-08-2011 17:19:47 (QP5 v5.115.810.9015) */
SELECT   DISTINCT msi.SEGMENT1 New_Item_Code,
                  msi.DESCRIPTION,
                  msi.PRIMARY_UNIT_OF_MEASURE,
                  msi.ATTRIBUTE6 Old_Item_Code,
                  mcbk.CONCATENATED_SEGMENTS Item_Category
  FROM   apps.mtl_system_items_b msi,
         apps.mtl_item_categories mic,
         apps.mtl_categories_b_kfv mcbk,
         apps.mtl_category_sets mcs
 WHERE       msi.inventory_item_id = mic.inventory_item_id
         AND msi.organization_id = mic.organization_id
         AND mcbk.category_id = mic.category_id
         AND mcbk.structure_id = mcs.structure_id
         AND mic.category_set_id = mcs.category_set_id
         AND msi.ITEM_TYPE NOT IN ('AG', 'AA', 'RB')
         AND msi.ORGANIZATION_ID = 117
        
        

No comments:

Post a Comment