with data as (select 31059 parent,12345 child from dual union all select null,31059 from dual union all select 31059,41953 from dual union all select null,112 from dual ) select :input input,child from data start with child = :input The above query is perfectly working. No doubt that. I need something like below: with data as (select 31059 parent,12345 child from dual union all select null,31059 from dual union all select 31059,41953 from dual union all select null,112 from dual ) select parent,child from data connect by prior child = parent where child = 31509. --- is it possible to use the :input in the where clause instead of having it here. because the view gets called from the client side and the standard is to pass values from UI layer. There are some restrictions to use in start with . so i am asking the condition in where clause instead of start with input: 31059 output 31059, 12345 null, 31059 31059, 41953 input : 112 o/p : null, 112