The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT user_name, email_address
FROM fnd_user
WHERE user_id = p_user_id;
SELECT value from v$parameter
WHERE lower(name) = 'utl_file_dir';
SELECT name from v$database;
fnd_msg_pub.delete_msg(p_msg_index => k);
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id,
wdd.released_status, wdd.requested_quantity, wdd.source_code, wdd.batch_id,
wdd.source_line_id, wdd.source_header_id, wdd.oe_interfaced_flag, wdd.inv_interfaced_flag,
wdd.ship_set_id, wdd.date_requested, wdd.date_scheduled, wdd.ship_to_contact_id,
wdd.ship_to_site_use_id, wdd.org_id, wdd.organization_id,
wdd.ship_tolerance_above, wdd.ship_tolerance_below,
wdd.picked_quantity, wdd.cycle_count_quantity, wdd.shipped_quantity detail_sq,
ol.line_id,
RTRIM(ol.line_number || '.' || ol.shipment_number || '.' || ol.option_number || '.' || ol.component_number || '.' || ol.service_number, '.') line_number,
ol.ordered_quantity, ol.cancelled_flag,
ol.ship_set_id ol_ship_set_id, ol.shipped_quantity, ol.flow_status_code, ol.open_flag,
ol.ship_from_org_id, ol.org_id ol_org_id,ol.schedule_ship_date, ol.request_date,
ol.shipping_interfaced_flag, ol.header_id,
ol.ship_to_contact_id ol_ship_to_contact_id, ol.ship_to_org_id,
ol.fulfilled_quantity, ol.invoiced_quantity,
oh.order_number, oh.ship_from_org_id,
wnd.delivery_id, wnd.status_code dlvy_status_code, wts.status_code stop_status_code, wdl.delivery_leg_id
from wsh_delivery_details wdd,
oe_order_lines_all ol,
oe_order_headers_all oh,
wsh_delivery_assignments_v wda,
wsh_new_deliveries wnd,
wsh_delivery_legs wdl,
wsh_trip_stops wts
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id
and nvl(ol.shippable_flag, 'N') = 'Y'
and wdd.source_header_id = p_source_header_id
and ol.header_id = oh.header_id
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id = wnd.delivery_id (+)
and wnd.delivery_id = wdl.delivery_id (+)
and wdl.pick_up_stop_id = wts.stop_id (+);
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id,
wdd.released_status, wdd.requested_quantity, wdd.source_code, wdd.batch_id,
wdd.source_line_id, wdd.source_header_id, wdd.oe_interfaced_flag, wdd.inv_interfaced_flag,
wdd.ship_set_id, wdd.date_requested, wdd.date_scheduled, wdd.ship_to_contact_id,
wdd.ship_to_site_use_id, wdd.org_id, wdd.organization_id,
wdd.ship_tolerance_above, wdd.ship_tolerance_below,
wdd.picked_quantity, wdd.cycle_count_quantity, wdd.shipped_quantity detail_sq,
ol.line_id,
RTRIM(ol.line_number || '.' || ol.shipment_number || '.' || ol.option_number || '.' || ol.component_number || '.' || ol.service_number, '.') line_number,
ol.ordered_quantity, ol.cancelled_flag,
ol.ship_set_id ol_ship_set_id, ol.shipped_quantity, ol.flow_status_code, ol.open_flag,
ol.ship_from_org_id, ol.org_id ol_org_id,ol.schedule_ship_date, ol.request_date,
ol.shipping_interfaced_flag, ol.header_id,
ol.ship_to_contact_id ol_ship_to_contact_id, ol.ship_to_org_id,
ol.fulfilled_quantity, ol.invoiced_quantity,
oh.order_number, oh.ship_from_org_id,
wnd.delivery_id, wnd.status_code dlvy_status_code, wts.status_code stop_status_code, wdl.delivery_leg_id
from wsh_delivery_details wdd,
oe_order_lines_all ol,
oe_order_headers_all oh,
wsh_delivery_assignments_v wda,
wsh_new_deliveries wnd,
wsh_delivery_legs wdl,
wsh_trip_stops wts
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id
and nvl(ol.shippable_flag, 'N') = 'Y'
and wdd.source_line_id = p_source_line_id
and ol.header_id = oh.header_id
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id = wnd.delivery_id (+)
and wnd.delivery_id = wdl.delivery_id (+)
and wdl.pick_up_stop_id = wts.stop_id (+);
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id,
wdd.released_status, wdd.requested_quantity, wdd.source_code, wdd.batch_id,
wdd.source_line_id, wdd.source_header_id, wdd.oe_interfaced_flag, wdd.inv_interfaced_flag,
wdd.ship_set_id, wdd.date_requested, wdd.date_scheduled, wdd.ship_to_contact_id,
wdd.ship_to_site_use_id, wdd.org_id, wdd.organization_id,
wdd.ship_tolerance_above, wdd.ship_tolerance_below,
wdd.picked_quantity, wdd.cycle_count_quantity, wdd.shipped_quantity detail_sq,
ol.line_id,
RTRIM(ol.line_number || '.' || ol.shipment_number || '.' || ol.option_number || '.' || ol.component_number || '.' || ol.service_number, '.') line_number,
ol.ordered_quantity, ol.cancelled_flag,
ol.ship_set_id ol_ship_set_id, ol.shipped_quantity, ol.flow_status_code, ol.open_flag,
ol.ship_from_org_id, ol.org_id ol_org_id,ol.schedule_ship_date, ol.request_date,
ol.shipping_interfaced_flag, ol.header_id,
ol.ship_to_contact_id ol_ship_to_contact_id, ol.ship_to_org_id,
ol.fulfilled_quantity, ol.invoiced_quantity,
oh.order_number, oh.ship_from_org_id,
wnd.delivery_id, wnd.status_code dlvy_status_code, wts.status_code stop_status_code, wdl.delivery_leg_id
from wsh_delivery_details wdd,
oe_order_lines_all ol,
oe_order_headers_all oh,
wsh_delivery_assignments_v wda,
wsh_new_deliveries wnd,
wsh_delivery_legs wdl,
wsh_trip_stops wts
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id
and nvl(ol.shippable_flag, 'N') = 'Y'
and ol.header_id = oh.header_id
and wda.delivery_id = p_delivery_id
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id is not null
and wda.delivery_id = wnd.delivery_id (+)
and wnd.delivery_id = wdl.delivery_id (+)
and wdl.pick_up_stop_id = wts.stop_id (+);
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id,
wdd.released_status, wdd.requested_quantity, wdd.source_code, wdd.batch_id,
wdd.source_line_id, wdd.source_header_id, wdd.oe_interfaced_flag, wdd.inv_interfaced_flag,
wdd.ship_set_id, wdd.date_requested, wdd.date_scheduled, wdd.ship_to_contact_id,
wdd.ship_to_site_use_id, wdd.org_id, wdd.organization_id,
wdd.ship_tolerance_above, wdd.ship_tolerance_below,
wdd.picked_quantity, wdd.cycle_count_quantity, wdd.shipped_quantity detail_sq,
ol.line_id,
RTRIM(ol.line_number || '.' || ol.shipment_number || '.' || ol.option_number || '.' || ol.component_number || '.' || ol.service_number, '.') line_number,
ol.ordered_quantity, ol.cancelled_flag,
ol.ship_set_id ol_ship_set_id, ol.shipped_quantity, ol.flow_status_code, ol.open_flag,
ol.ship_from_org_id, ol.org_id ol_org_id,ol.schedule_ship_date, ol.request_date,
ol.shipping_interfaced_flag, ol.header_id,
ol.ship_to_contact_id ol_ship_to_contact_id, ol.ship_to_org_id,
ol.fulfilled_quantity, ol.invoiced_quantity,
oh.order_number, oh.ship_from_org_id,
wnd.delivery_id, wnd.status_code dlvy_status_code, wts.status_code stop_status_code, wdl.delivery_leg_id
from wsh_delivery_details wdd,
oe_order_lines_all ol,
oe_order_headers_all oh,
wsh_delivery_assignments_v wda,
wsh_new_deliveries wnd,
wsh_delivery_legs wdl,
wsh_trip_stops wts
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id
and nvl(ol.shippable_flag, 'N') = 'Y'
and ol.header_id = oh.header_id
and wdd.batch_id = p_batch_id
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id = wnd.delivery_id (+)
and wnd.delivery_id = wdl.delivery_id (+)
and wdl.pick_up_stop_id = wts.stop_id (+);
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id
from wsh_delivery_details wdd,
oe_order_lines_all ol
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id
and nvl(wdd.ship_tolerance_above,0) = 0
and nvl(wdd.ship_tolerance_below,0) = 0
and wdd.source_header_id = p_source_header_id
and (wdd.released_status = 'D' or wdd.requested_quantity = 0)
and (ol.ordered_quantity > 0 or ol.cancelled_flag = 'N')
and not exists (
select 'x'
from wsh_delivery_details wdd1
where wdd1.source_line_id = wdd.source_line_id
and wdd1.delivery_detail_id <> wdd.delivery_detail_id
and (wdd1.released_status <> 'D' or wdd1.requested_quantity > 0))
and nvl(ol.shippable_flag, 'N') = 'Y';
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id
from wsh_delivery_details wdd,
oe_order_lines_all ol
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id
and nvl(wdd.ship_tolerance_above,0) = 0
and nvl(wdd.ship_tolerance_below,0) = 0
and wdd.source_line_id = p_source_line_id
and (wdd.released_status = 'D' or wdd.requested_quantity = 0)
and (ol.ordered_quantity > 0 or ol.cancelled_flag = 'N')
and not exists (
select 'x'
from wsh_delivery_details wdd1
where wdd1.source_line_id = wdd.source_line_id
and wdd1.delivery_detail_id <> wdd.delivery_detail_id
and (wdd1.released_status <> 'D' or wdd1.requested_quantity > 0))
and nvl(ol.shippable_flag, 'N') = 'Y';
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id
from wsh_delivery_details wdd,
oe_order_lines_all ol,
wsh_delivery_assignments_v wda
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id
and nvl(wdd.ship_tolerance_above,0) = 0
and nvl(wdd.ship_tolerance_below,0) = 0
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id is not null
and wda.delivery_id = p_delivery_id
and (wdd.released_status = 'D' or wdd.requested_quantity = 0)
and (ol.ordered_quantity > 0 or ol.cancelled_flag = 'N')
and not exists (
select 'x'
from wsh_delivery_details wdd1
where wdd1.source_line_id = wdd.source_line_id
and wdd1.delivery_detail_id <> wdd.delivery_detail_id
and (wdd1.released_status <> 'D' or wdd1.requested_quantity > 0))
and nvl(ol.shippable_flag, 'N') = 'Y';
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id
from wsh_delivery_details wdd,
oe_order_lines_all ol
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id
and nvl(wdd.ship_tolerance_above,0) = 0
and nvl(wdd.ship_tolerance_below,0) = 0
and wdd.batch_id = p_batch_id
and (wdd.released_status = 'D' or wdd.requested_quantity = 0)
and (ol.ordered_quantity > 0 or ol.cancelled_flag = 'N')
and not exists (
select 'x'
from wsh_delivery_details wdd1
where wdd1.source_line_id = wdd.source_line_id
and wdd1.delivery_detail_id <> wdd.delivery_detail_id
and (wdd1.released_status <> 'D' or wdd1.requested_quantity > 0))
and nvl(ol.shippable_flag, 'N') = 'Y';
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id
from wsh_delivery_details wdd,
oe_order_lines_all ol
where wdd.source_code = 'OE'
and wdd.source_header_id = p_source_header_id
and wdd.source_line_id = ol.line_id
and nvl(wdd.oe_interfaced_flag,'N') = 'N'
and exists (
select 'x'
from oe_order_lines_all ol1
where ol1.ship_set_id = wdd.ship_set_id
and ol1.header_id = wdd.source_header_id
and ol1.shipped_quantity is NOT NULL
and ol1.flow_status_code <> 'AWAITING_SHIPPING')
and wdd.ship_set_id is NOT NULL
and nvl(ol.shippable_flag, 'N') = 'Y'
and wdd.released_status <> 'D';
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id
from wsh_delivery_details wdd,
oe_order_lines_all ol
where wdd.source_code = 'OE'
and wdd.source_line_id = p_source_line_id
and wdd.source_line_id = ol.line_id
and nvl(wdd.oe_interfaced_flag,'N') = 'N'
and exists (
select 'x'
from oe_order_lines_all ol1
where ol1.ship_set_id = wdd.ship_set_id
and ol1.header_id = wdd.source_header_id
and ol1.shipped_quantity is NOT NULL
and ol1.flow_status_code <> 'AWAITING_SHIPPING')
and wdd.ship_set_id is NOT NULL
and nvl(ol.shippable_flag, 'N') = 'Y'
and wdd.released_status <> 'D';
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id
from wsh_delivery_details wdd,
wsh_delivery_assignments_v wda,
oe_order_lines_all ol
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id is not null
and wda.delivery_id = p_delivery_id
and nvl(wdd.oe_interfaced_flag,'N') = 'N'
and exists (
select 'x'
from oe_order_lines_all ol1
where ol1.ship_set_id = wdd.ship_set_id
and ol1.header_id = wdd.source_header_id
and ol1.shipped_quantity is NOT NULL
and ol1.flow_status_code <> 'AWAITING_SHIPPING')
and wdd.ship_set_id is NOT NULL
and nvl(ol.shippable_flag, 'N') = 'Y'
and wdd.released_status <> 'D';
select wdd.source_header_number, wdd.source_line_number, wdd.delivery_detail_id
from wsh_delivery_details wdd,
oe_order_lines_all ol
where wdd.source_code = 'OE'
and wdd.batch_id = p_batch_id
and wdd.source_line_id = ol.line_id
and nvl(wdd.oe_interfaced_flag,'N') = 'N'
and exists (
select 'x'
from oe_order_lines_all ol1
where ol1.ship_set_id = wdd.ship_set_id
and ol1.header_id = wdd.source_header_id
and ol1.shipped_quantity is NOT NULL
and ol1.flow_status_code <> 'AWAITING_SHIPPING')
and wdd.ship_set_id is NOT NULL
and nvl(ol.shippable_flag, 'N') = 'Y'
and wdd.released_status <> 'D';
select oh.order_number,
RTRIM(ol.line_number || '.' || ol.shipment_number || '.' || ol.option_number || '.' || ol.component_number || '.' || ol.service_number, '.') line_number
from oe_order_headers_all oh,
oe_order_lines_all ol
where oh.header_id = ol.header_id
and oh.header_id = p_source_header_id
and ol.shipping_interfaced_flag = 'Y'
and nvl(ol.shippable_flag, 'N') = 'Y'
and not exists (
select 'x'
from wsh_delivery_details wdd
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id);
select oh.order_number,
RTRIM(ol.line_number || '.' || ol.shipment_number || '.' || ol.option_number || '.' || ol.component_number || '.' || ol.service_number, '.') line_number
from oe_order_headers_all oh,
oe_order_lines_all ol
where oh.header_id = ol.header_id
and ol.line_id = p_source_line_id
and ol.shipping_interfaced_flag = 'Y'
and nvl(ol.shippable_flag, 'N') = 'Y'
and not exists (
select 'x'
from wsh_delivery_details wdd
where wdd.source_code = 'OE'
and wdd.source_line_id = ol.line_id);
select oeh.order_number,
oel.line_id,
RTRIM(oel.line_number || '.' || oel.shipment_number || '.' || oel.option_number || '.' || oel.component_number || '.' || oel.service_number, '.') line_number
from oe_order_headers_all oeh,
oe_order_lines_all oel
where oeh.header_id = p_source_header_id
and oeh.header_id = oel.header_id
and oel.open_flag = 'N'
and nvl(oel.shippable_flag, 'N') = 'Y'
and exists (
select 'x'
from mtl_reservations mr
where mr.demand_source_line_id = oel.line_id
and mr.primary_reservation_quantity > 0
)
and not exists (
select 'x'
from wsh_delivery_details wdd
where wdd.source_line_id = oel.line_id
and wdd.source_code = 'OE'
and wdd.inv_interfaced_flag in ('N','P'))
order by 1,2;
select oeh.order_number,
oel.line_id,
RTRIM(oel.line_number || '.' || oel.shipment_number || '.' || oel.option_number || '.' || oel.component_number || '.' || oel.service_number, '.') line_number
from oe_order_headers_all oeh,
oe_order_lines_all oel
where oel.line_id = p_source_line_id
and oeh.header_id = oel.header_id
and oel.open_flag = 'N'
and nvl(oel.shippable_flag, 'N') = 'Y'
and exists (
select 'x'
from mtl_reservations mr
where mr.demand_source_line_id = oel.line_id
and mr.primary_reservation_quantity > 0
)
and not exists (
select 'x'
from wsh_delivery_details wdd
where wdd.source_line_id = oel.line_id
and wdd.source_code = 'OE'
and wdd.inv_interfaced_flag in ('N','P'))
order by 1,2;
g_dc_table.delete;
g_dc_table.delete;
g_dc_table.delete;
g_dc_table.delete;