Professional Documents
Culture Documents
Lot Number List For Data Fix
Lot Number List For Data Fix
Lot Number
Select * from Apps.T_PARENT_LOTS_API a where New_factory_name='F43' and NEW_BOM_LEVEL='MOD'
AND Action_code='MOVE' /*and status_code Not in (3)*/ and creation_date>=Sysdate-3
and not exists (select 1 from apps.MTL_ONHAND_QUANTITIES_DETAIL mo, apps.mtl_parameters mp,
apps.MTL_SYSTEM_ITEMS_B MSIB
WHERE mo.organization_ID=mp.organization_ID
and mo.inventory_item_id=msib.inventory_item_id
AND MP.organization_ID=MSIB.organization_ID
and msib.segment1= REPLACE(a.NEW_ROUTING, a.new_factory_name||'-','')
and mp.organization_code=a.new_factory_name
and mo.LOT_NUMBER=a.lot_id
)
and not exists (select 1 From apps.mtl_lot_numbers mln
where mln.lot_number=a.lot_id)
ORDER BY lot_id ;