DBA Data[Home] [Help]

APPS.INV_DIAG_RSV_WDD_STG_MCH SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 46

    JTF_DIAGNOSTIC_COREAPI.insert_style_sheet;
Line: 49

    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 mr.organization_id = mp.organization_id (+)' ||
               ' AND mr.inventory_item_id = mif.inventory_item_id (+)' ||
               ' AND mr.organization_id = mif.organization_id (+)' ||
               ' AND mr.supply_source_type_id=13' ||
               ' and mr.demand_source_type_id in (2,8)' ||
               ' and nvl(mr.staged_flag,''N'') =''N''' ||
               ' 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 =''S''' ||
                                                  ' 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 <> ''S''))' ||
               ' and mr.reservation_id not in (select reservation_id from' ||
                                               ' mtl_material_transactions_temp mmtt' ||
                                               ' where mmtt.trx_source_line_id=mr.demand_source_line_id' ||
                                               ' and mr.demand_source_type_id=mmtt.transaction_source_type_id' ||
                                               ' and mmtt.reservation_id is not null)  ';