where msi.organization_id=X
and msi.INVENTORY_ITEM_STATUS_CODE<>'New' and msi.INVENTORY_ITEM_ID=cic.INVENTORY_ITEM_ID and cic.organization_id=msi.organization_id and cic.COST_TYPE_ID in (1) and decode(cic.ITEM_COST,'',0,cic.ITEM_COST)=0 and msi.INVENTORY_ITEM_STATUS_CODE not in ('Inactive','PHActive') order by msi.creation_date