The following lines contain the word 'select', 'insert', 'update' or 'delete':
JTF_DIAGNOSTIC_COREAPI.insert_style_sheet;
sqltxt := ' select' ||
' mp.organization_code || '' ('' ||mr.organization_id|| '')'' "Organization Code (Id)"' ||
' ,mif.item_number||'' (''||mif.inventory_item_id||'')'' "Item (Id)"' ||
' ,mr.reservation_id "Rsv ID"' ||
' ,TO_CHAR( requirement_date, ''DD-MON-RR'' ) "Requirement Date"' ||
' , reservation_quantity' ||
' , primary_reservation_quantity' ||
' , detailed_quantity' ||
' , demand_source_type_id' ||
' , demand_source_name' ||
' , demand_source_header_id' ||
' , demand_source_line_id' ||
' , demand_source_delivery' ||
' , revision' ||
' , subinventory_code' ||
' , locator_id' ||
' , lot_number "Lot Number"' ||
' , serial_number "Serial Number"' ||
' , lpn_id' ||
' , TO_CHAR( mr.creation_date, ''DD-MON-RR'' ) "Creation DateE"' ||
' , TO_CHAR( mr.last_update_date, ''DD-MON-RR'' ) "Last UPDATE Date"' ||
' from mtl_reservations mr,' ||
' mtl_parameters mp,' ||
' mtl_item_flexfields mif ' ||
' where nvl(mr.staged_flag,''N'') <> ''Y''' ||
' and mr.demand_source_type_id in (2,8)' ||
' and mr.supply_source_type_id =13' ||
' AND mr.organization_id = mp.organization_id (+)' ||
' AND mr.inventory_item_id = mif.inventory_item_id (+)' ||
' AND mr.organization_id = mif.organization_id (+)' ||
' and mr.demand_source_line_id in (select wdd1.source_line_id from' ||
' wsh_delivery_details wdd1' ||
' where wdd1.source_line_id=mr.demand_source_line_id' ||
' and wdd1.source_code=''OE''' ||
' and wdd1.released_status in (''Y'',''C'')' ||
' and not exists (select 1 from' ||
' wsh_delivery_details wdd2' ||
' where wdd2.source_line_id=wdd1.source_line_id' ||
' and wdd2.source_code=''OE''' ||
' and wdd2.released_status in (''R'',''S''))) ';