The following lines contain the word 'select', 'insert', 'update' or 'delete':
select routing_sequence_id
into l_rtg_seq_id
from bom_operational_routings
where assembly_item_id = p_assy_item_id
and organization_id = p_org_id
and NVL(alternate_routing_designator, 'NONE') =
NVL(p_alt_rtg_desig, 'NONE');
select 1
into net_exists
from dual
where exists (select null
from bom_operation_networks_v
where routing_sequence_id = p_rtg_sequence_id
and operation_type = 3);
select from_op_seq_id operation_sequence_id
from bom_operation_networks
connect by prior from_op_seq_id = to_op_seq_id
and transition_type <> 3
start with to_op_seq_id = c_line_op_id
and transition_type <> 3;
select operation_sequence_id, operation_seq_num
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_seq_num < p_curr_line_op
and operation_type = 3
and nvl(eco_for_production,2) = 2
and exists (select null
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_seq_num = p_curr_line_op
and nvl(eco_for_production,2) = 2
and operation_type = 3);
select operation_sequence_id
into l_op_seq_id
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and nvl(eco_for_production,2) = 2
and operation_seq_num = p_curr_line_op;
select operation_seq_num
into l_op_seq_num
from bom_operation_sequences
where operation_sequence_id =
all_prior_line_op_rec.operation_sequence_id;
select from_op_seq_id operation_sequence_id
from bom_operation_networks
connect by prior from_op_seq_id = to_op_seq_id
and transition_type NOT IN (2, 3)
start with to_op_seq_id = c_line_op_id
and transition_type NOT IN (2, 3);
select from_op_seq_id operation_sequence_id
from bom_operation_networks
connect by prior from_op_seq_id = to_op_seq_id
and transition_type NOT IN (1, 3)
start with to_op_seq_id = c_line_op_id
and transition_type NOT IN (1, 3);
select operation_sequence_id, operation_seq_num
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_seq_num < p_curr_line_op
and operation_type = 3
and nvl(eco_for_production,2) = 2
and exists (select null
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_seq_num = p_curr_line_op
and nvl(eco_for_production,2) = 2
and operation_type = 3);
select operation_sequence_id
into l_op_seq_id
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and operation_seq_num = p_curr_line_op;
select 1
into l_transition_type
from bom_operation_networks
where to_op_seq_id = l_op_seq_id
and transition_type = 1
and rownum =1 ;
select operation_seq_num
into l_op_seq_num
from bom_operation_sequences
where operation_sequence_id =
primary_line_op_rec.operation_sequence_id;
select operation_seq_num
into l_op_seq_num
from bom_operation_sequences
where operation_sequence_id =
alt_line_op_rec.operation_sequence_id;
select operation_seq_num
into l_op_seq_num
from bom_operation_sequences
where operation_sequence_id =
primary_line_op_rec.operation_sequence_id;
select from_seq_num operation_seq_num ,
from_op_seq_id operation_sequence_id
from bom_operation_networks_v
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and transition_type <> 3
union
select bonv.to_seq_num operation_seq_num,
to_op_seq_id operation_sequence_id
from bom_operation_networks_v bonv
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and not exists (select null
from bom_operation_networks_v net
where bonv.to_op_seq_id = net.from_op_seq_id
and transition_type <> 3
and net.routing_sequence_id = l_rtg_seq_id);
select bos1.operation_seq_num operation_seq_num ,
bon1.from_op_seq_id operation_sequence_id
from bom_operation_networks bon1 ,bom_operation_sequences bos1
where bos1.routing_sequence_id = l_rtg_seq_id
and bos1.operation_type = 3
and bon1.transition_type <> 3
and bon1.from_op_seq_id = bos1.operation_sequence_id
union
select bos2.operation_seq_num operation_seq_num,
bon2.to_op_seq_id operation_sequence_id
from bom_operation_networks bon2, bom_operation_sequences bos2
where bos2.routing_sequence_id = l_rtg_seq_id
and bos2.operation_type = 3
and bon2.to_op_seq_id = bos2.operation_sequence_id
and not exists ( select null
from bom_operation_networks net ,bom_operation_sequences bos3
where bon2.to_op_seq_id = net.from_op_seq_id
and net.transition_type <> 3
and bos3.routing_sequence_id = l_rtg_seq_id
and net.from_op_seq_id = bos3.operation_sequence_id );
select operation_sequence_id, operation_seq_num
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and nvl(eco_for_production,2) = 2
and operation_type = 3;
select from_seq_num operation_seq_num ,
from_op_seq_id operation_sequence_id
from bom_operation_networks_v
where routing_sequence_id = l_rtg_seq_id
and transition_type = 1
and operation_type = 3
union
select bonv.to_seq_num operation_seq_num,
to_op_seq_id operation_sequence_id
from bom_operation_networks_v bonv
where routing_sequence_id = l_rtg_seq_id
and transition_type = 1
and operation_type = 3
and not exists (select null
from bom_operation_networks_v net
where bonv.to_op_seq_id = net.from_op_seq_id
and transition_type <> 3
and net.routing_sequence_id = l_rtg_seq_id);
select bos1.operation_seq_num operation_seq_num ,
bon1.from_op_seq_id operation_sequence_id
from bom_operation_networks bon1 ,bom_operation_sequences bos1
where bos1.routing_sequence_id = l_rtg_seq_id
and bon1.transition_type = 1
and bos1.operation_type = 3
and bon1.from_op_seq_id = bos1.operation_sequence_id
union
select bos2.operation_seq_num operation_seq_num,
bon2.to_op_seq_id operation_sequence_id
from bom_operation_networks bon2, bom_operation_sequences bos2
where bos2.routing_sequence_id = l_rtg_seq_id
and bon2.transition_type = 1
and bos2.operation_type = 3
and bon2.to_op_seq_id = bos2.operation_sequence_id
and not exists ( select null
from bom_operation_networks net ,bom_operation_sequences bos3
where bon2.to_op_seq_id = net.from_op_seq_id
and net.transition_type <> 3
and bos3.routing_sequence_id = l_rtg_seq_id
and net.from_op_seq_id = bos3.operation_sequence_id );
select operation_sequence_id, operation_seq_num
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and nvl(eco_for_production,2) = 2
and operation_type = 3;
select to_op_seq_id operation_sequence_id
from bom_operation_networks
connect by prior to_op_seq_id = from_op_seq_id
and transition_type <> 3
start with from_op_seq_id = c_line_op_id
and transition_type <> 3;
select operation_sequence_id, operation_seq_num
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_seq_num > p_curr_line_op
and nvl(eco_for_production,2) = 2
and operation_type = 3
and exists (select null
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_seq_num = p_curr_line_op
and operation_type = 3);
select operation_sequence_id
into l_op_seq_id
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and operation_seq_num = p_curr_line_op;
select operation_seq_num
into l_op_seq_num
from bom_operation_sequences
where operation_sequence_id =
all_next_line_op_rec.operation_sequence_id;
select to_seq_num
into next_line_op
from bom_operation_networks_v
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and from_seq_num = p_curr_line_op
and transition_type = 1;
select min(to_seq_num)
into next_line_op
from bom_operation_networks_v
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and from_seq_num = p_curr_line_op
and transition_type = 2;
select MIN(operation_seq_num)
into next_line_op
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and nvl(eco_for_production,2) = 2
and operation_seq_num > p_curr_line_op
and exists (select null
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and operation_seq_num = p_curr_line_op);
select 1
into l_last_op
from dual
where not exists (select null
from bom_operation_networks_v
where from_seq_num = p_curr_line_op
and operation_type = 3
and transition_type <> 3
and routing_sequence_id = l_rtg_seq_id)
and exists (select null
from bom_operation_networks_v
where to_seq_num = p_curr_line_op
and transition_type <> 3
and operation_type = 3
and routing_sequence_id = l_rtg_seq_id);
select 1
into l_last_op
from dual
where not exists (select null
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and nvl(eco_for_production,2) = 2
and operation_seq_num > p_curr_line_op)
and exists (select null
from bom_operation_sequences
where routing_sequence_id = l_rtg_seq_id
and operation_type = 3
and operation_seq_num = p_curr_line_op);