Dear Friends
Trying to create the query to explode BOM multi level in pl sql. Following is my code where getting a error message. Please suggest where getting wrong in the Query
ORA-00904: "ECN_V"."ITEM_TYPE": invalid identifier 00904. 00000 - "%s: invalid identifier"
Error at Line: 25 Column: 12
--------------------------------------------
SELECT
level AS seq_no,
id,
ecn_no,
item_type,
to_char(parent_item) parent_item,
( description ) parent_name,
prod_uom,
produced_qty,
consumed_qty,
round(consumed_qty / produced_qty, 7) ratio,
to_char(child_item) child_item,
child_description,
rpad('/',(level - 1) * 1, '/')
|| child_item AS l1,
con_uom
FROM
(SELECT SALESORDER_O_VIEW.ITEM_CODE,SALESORDER_O_VIEW.PENDING_QTY
FROM ECN_V,SALESORDER_O_VIEW
WHERE ECN_V.PARENT_ITEM = SALESORDER_O_VIEW.ITEM_CODE
)
ecn_v
CONNECT BY
PRIOR child_item = parent_item
START WITH ecn_v.item_type = 'A'
ORDER SIBLINGS BY ecn_v.item_type