When I format this hierarchacal query, the space to the right of the "prior" keyword is removed:
SELECT
level,
prod_fmd.formula_id,
prod_fmd.organization_id,
prod_fmd.inventory_item_id prod_inventory_item_id,
ing_fmd.inventory_item_id ing_inventory_item_id
FROM
apps.fm_matl_dtl prod_fmd
JOIN
apps.fm_matl_dtl ing_fmd
ON
1 = 1
AND
prod_fmd.formula_id = ing_fmd.formula_id
AND
prod_fmd.line_type = 1
AND
ing_fmd.line_type =-1
JOIN
apps.fm_form_mst_b fm
ON
ing_fmd.formula_id = fm.formula_id
AND
fm.formula_status = 700
WHERE
1 = 1
START WITH
ing_fmd.inventory_item_id = (
SELECT
MAX(inventory_item_id)
FROM
apps.mtl_system_items_b
WHERE 1=1
AND
enabled_flag = 'Y'
AND
segment1 =:item_name
)
CONNECT BY
ing_fmd.inventory_item_id = PRIOR prod_fmd.inventory_item_id
it becomes:
PRIORprod_fmd.inventory_item_id