In the given Scenario we have several lots of ingrediances we mix to indermediate product lots. These intermediate product lots are used for further intermediate products or for finished product lots. There are an different amount of indermediate steps between the ingrediances and the finished product.
To find all lots that are used in a given finished product lot I'd like to write an Oracle SQL like:
SELECT
something
FROM (
SELECT
something_else
FROM DB_TABLE
START WITH DB_TABLE.OUTPUT = START_VALUE
CONNECT BY NOCYCLE PRIOR DB_TABLE.OUTPUT = DB_TABLE.INPUT
) QRY_NAME
WHERE START_VALUE = '1400929801'
I know, that this example above doesn't work but it shows what im looking for.
So, I need to define the start with value in the where clause of the outer query - but don't have clue how.
The query will be enbedded in a software, where users are only able to define the where clause.