DBA Data[Home] [Help]

APPS.FTE_BULK_DTT_PKG SQL Statements

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

Line: 55

g_bulk_insert_limit      CONSTANT NUMBER := 250;
Line: 520

l_location_last_update_date       FTE_BULK_DTT_PKG.fte_distu_tmp_date_table;
Line: 521

l_location_last_updated_by        FTE_BULK_DTT_PKG.fte_distu_tmp_num_table;
Line: 522

l_location_last_update_login      FTE_BULK_DTT_PKG.fte_distu_tmp_num_table;
Line: 525

l_location_program_update_date    FTE_BULK_DTT_PKG.fte_distu_tmp_date_table;
Line: 527

l_deleted_download_ids            FTE_BULK_DTT_PKG.fte_distu_tmp_num_table;
Line: 532

select count(fmdl.download_file_id)
from   fte_mile_download_lines fmdl
where  fmdl.download_file_id = cp_download_file_id;
Line: 538

select fmdf.download_file_id,
       fmdf.template_id,
       fmdf.download_date,
       fmdf.upload_date,
       fmdf.identifier_type
from   fte_mile_download_files fmdf
where  fmdf.file_name = cp_file_name;
Line: 548

select fmdl.origin_id,
       fmdl.destination_id
from   fte_mile_download_lines fmdl
where  fmdl.download_file_id = cp_download_file_id;
Line: 556

select fmtc.column_id,
       fmtc.start_position,
       fmtc.length
from   fte_mile_template_columns fmtc
where  fmtc.column_type = cp_column_type
and    fmtc.template_id = cp_template_id;
Line: 565

select fmca.enabled_flag,
       fmca.return_format,
       fmca.db_uom
from   fte_mile_column_attributes fmca
where  fmca.column_id = cp_column_id;
Line: 603

select tt.origin_id,
       tt.destination_id,
       fdlt.origin_id,
       fdlt.destination_id,
       fdlt.identifier_type,
       fdlt.distance,
       fdlt.distance_uom,
       fdlt.transit_time,
       fdlt.transit_time_uom,
       fdlt.creation_date,
       fdlt.created_by,
       fdlt.last_update_date,
       fdlt.last_updated_by,
       fdlt.last_update_login,
       fdlt.program_application_id,
       fdlt.program_id,
       fdlt.program_update_date,
       fdlt.request_id
from (SELECT origin_id,
             destination_id,
             identifier_type,
             distance,
             distance_uom,
             transit_time,
             transit_time_uom,
             creation_date,
             created_by,
             last_update_date,
             last_updated_by,
             last_update_login,
             program_application_id,
             program_id,
             program_update_date,
             request_id FROM FTE_DISTANCE_LOADER_TMP) fdlt,
      FTE_LOCATION_MILEAGES tt
where fdlt.origin_id      = tt.origin_id(+)
and   fdlt.destination_id = tt.destination_id(+);
Line: 649

l_u_last_update_date_tab          FTE_BULK_DTT_PKG.fte_distu_tmp_date_table;
Line: 650

l_u_last_updated_by_tab           FTE_BULK_DTT_PKG.fte_distu_tmp_num_table;
Line: 651

l_u_last_update_login_tab         FTE_BULK_DTT_PKG.fte_distu_tmp_num_table;
Line: 654

l_u_program_update_date_tab       FTE_BULK_DTT_PKG.fte_distu_tmp_date_table;
Line: 666

l_i_last_update_date_tab          FTE_BULK_DTT_PKG.fte_distu_tmp_date_table;
Line: 667

l_i_last_updated_by_tab           FTE_BULK_DTT_PKG.fte_distu_tmp_num_table;
Line: 668

l_i_last_update_login_tab         FTE_BULK_DTT_PKG.fte_distu_tmp_num_table;
Line: 671

l_i_program_update_date_tab       FTE_BULK_DTT_PKG.fte_distu_tmp_date_table;
Line: 685

l_new_last_update_date_tab        FTE_BULK_DTT_PKG.fte_distu_tmp_date_table;
Line: 686

l_new_last_updated_by_tab         FTE_BULK_DTT_PKG.fte_distu_tmp_num_table;
Line: 687

l_new_last_update_login_tab       FTE_BULK_DTT_PKG.fte_distu_tmp_num_table;
Line: 690

l_new_program_update_date_tab     FTE_BULK_DTT_PKG.fte_distu_tmp_date_table;
Line: 694

l_insert_ctr                      PLS_INTEGER;
Line: 695

l_update_ctr                      PLS_INTEGER;
Line: 715

select muomv.uom_code
from   mtl_units_of_measure_vl muomv,
       wsh_global_parameters   wgp
where  wgp.gu_time_class     = muomv.uom_class
and    muomv.unit_of_measure = x_unit_of_measure
and    muomv.language        = x_language;
Line: 724

select muomv.uom_code
from   mtl_units_of_measure_vl muomv,
       wsh_global_parameters wgp
where  wgp.GU_DISTANCE_CLASS  = muomv.uom_class
and    muomv.UNIT_OF_MEASURE  = y_unit_of_measure
and    muomv.language         = y_language;
Line: 1508

           l_location_last_update_date(l_load_ctr)       := l_cur_date;
Line: 1509

           l_location_last_updated_by(l_load_ctr)        := g_user_id;
Line: 1510

           l_location_last_update_login(l_load_ctr)      := null;
Line: 1513

           l_location_program_update_date(l_load_ctr)    := null;
Line: 1518

                 WSH_DEBUG_SV.logmsg(l_module_name,'we are going to insert 250 at a time into the global temp table insert into fte_distance_loader_tmp');
Line: 1521

              FND_FILE.PUT_LINE(FND_FILE.log, 'Inserting 250 records into temp table');
Line: 1527

                 insert into fte_distance_loader_tmp(ORIGIN_ID,
                                                     DESTINATION_ID,
                                                     IDENTIFIER_TYPE,
                                                     DISTANCE,
                                                     DISTANCE_UOM,
                                                     TRANSIT_TIME,
                                                     TRANSIT_TIME_UOM,
                                                     CREATION_DATE,
                                                     CREATED_BY,
                                                     LAST_UPDATE_DATE,
                                                     LAST_UPDATED_BY,
                                                     LAST_UPDATE_LOGIN,
                                                     PROGRAM_APPLICATION_ID,
                                                     PROGRAM_ID,
                                                     PROGRAM_UPDATE_DATE,
                                                     REQUEST_ID)
                                              values(l_location_origin_id(i),
                                                     l_location_destination_id(i),
                                                     l_location_identifier_type(i),
                                                     l_location_distance(i),
                                                     l_location_distance_uom(i),
                                                     l_location_transit_time(i),
                                                     l_location_transit_time_uom(i),
                                                     l_location_creation_date(i),
                                                     l_location_created_by(i),
                                                     l_location_last_update_date(i),
                                                     l_location_last_updated_by(i),
                                                     l_location_last_update_login(i),
                                                     l_location_program_app_id(i),
                                                     l_location_program_id(i),
                                                     l_location_program_update_date(i),
                                                     l_location_request_id(i));
Line: 1568

              l_location_origin_id.DELETE;
Line: 1569

              l_location_destination_id.DELETE;
Line: 1570

              l_location_identifier_type.DELETE;
Line: 1571

              l_location_distance.DELETE;
Line: 1572

              l_location_distance_uom.DELETE;
Line: 1573

              l_location_transit_time.DELETE;
Line: 1574

              l_location_transit_time_uom.DELETE;
Line: 1575

              l_location_creation_date.DELETE;
Line: 1576

              l_location_created_by.DELETE;
Line: 1577

              l_location_last_update_date.DELETE;
Line: 1578

              l_location_last_updated_by.DELETE;
Line: 1579

              l_location_last_update_login.DELETE;
Line: 1580

              l_location_program_app_id.DELETE;
Line: 1581

              l_location_program_id.DELETE;
Line: 1582

              l_location_program_update_date.DELETE;
Line: 1583

              l_location_request_id.DELETE;
Line: 1869

           WSH_DEBUG_SV.logmsg(l_module_name,'insert the last few lines that did not sum upto 250 into the Global temp table');
Line: 1872

        FND_FILE.PUT_LINE(FND_FILE.log, 'Inserting remainder of records into temp table');
Line: 1875

           insert into fte_distance_loader_tmp(ORIGIN_ID,
                                               DESTINATION_ID,
                                               IDENTIFIER_TYPE,
                                               DISTANCE,
                                               DISTANCE_UOM,
                                               TRANSIT_TIME,
                                               TRANSIT_TIME_UOM,
                                               CREATION_DATE,
                                               CREATED_BY,
                                               LAST_UPDATE_DATE,
                                               LAST_UPDATED_BY,
                                               LAST_UPDATE_LOGIN,
                                               PROGRAM_APPLICATION_ID,
                                               PROGRAM_ID,
                                               PROGRAM_UPDATE_DATE,
                                               REQUEST_ID)
                                        values(l_location_origin_id(i),
                                               l_location_destination_id(i),
                                               l_location_identifier_type(i),
                                               l_location_distance(i),
                                               l_location_distance_uom(i),
                                               l_location_transit_time(i),
                                               l_location_transit_time_uom(i),
                                               l_location_creation_date(i),
                                               l_location_created_by(i),
                                               l_location_last_update_date(i),
                                               l_location_last_updated_by(i),
                                               l_location_last_update_login(i),
                                               l_location_program_app_id(i),
                                               l_location_program_id(i),
                                               l_location_program_update_date(i),
                                               l_location_request_id(i));
Line: 1915

        l_location_origin_id.DELETE;
Line: 1916

        l_location_destination_id.DELETE;
Line: 1917

        l_location_identifier_type.DELETE;
Line: 1918

        l_location_distance.DELETE;
Line: 1919

        l_location_distance_uom.DELETE;
Line: 1920

        l_location_transit_time.DELETE;
Line: 1921

        l_location_transit_time_uom.DELETE;
Line: 1922

        l_location_creation_date.DELETE;
Line: 1923

        l_location_created_by.DELETE;
Line: 1924

        l_location_last_update_date.DELETE;
Line: 1925

        l_location_last_updated_by.DELETE;
Line: 1926

        l_location_last_update_login.DELETE;
Line: 1927

        l_location_program_app_id.DELETE;
Line: 1928

        l_location_program_id.DELETE;
Line: 1929

        l_location_program_update_date.DELETE;
Line: 1930

        l_location_request_id.DELETE;
Line: 1940

        FND_FILE.PUT_LINE(FND_FILE.log, 'Number of lines in the table matched the number of lines in the file, inserting and/or updating into the location mileages table');
Line: 1943

           WSH_DEBUG_SV.logmsg(l_module_name,'Number of lines in the table matched the number of lines in the file, inserting and/or updating into the location mileages table');
Line: 2043

        l_old_origin_id_tab.DELETE;
Line: 2044

        l_old_destination_id_tab.DELETE;
Line: 2045

        l_new_origin_id_tab.DELETE;
Line: 2046

        l_new_destination_id_tab.DELETE;
Line: 2047

        l_new_identifier_type_tab.DELETE;
Line: 2048

        l_new_distance_tab.DELETE;
Line: 2049

        l_new_distance_uom_tab.DELETE;
Line: 2050

        l_new_transit_time_tab.DELETE;
Line: 2051

        l_new_transit_time_uom_tab.DELETE;
Line: 2052

        l_new_creation_date_tab.DELETE;
Line: 2053

        l_new_created_by_tab.DELETE;
Line: 2054

        l_new_last_update_date_tab.DELETE;
Line: 2055

        l_new_last_updated_by_tab.DELETE;
Line: 2056

        l_new_last_update_login_tab.DELETE;
Line: 2057

        l_new_program_app_id_tab.DELETE;
Line: 2058

        l_new_program_id_tab.DELETE;
Line: 2059

        l_new_program_update_date_tab.DELETE;
Line: 2060

        l_new_request_id_tab.DELETE;
Line: 2067

        FND_FILE.PUT_LINE(FND_FILE.log,'Open the cursor, c_get_merge_data, to get the records to update and/or insert');
Line: 2070

           WSH_DEBUG_SV.logmsg(l_module_name,'Open the cursor, c_get_merge_data, to get the records to update and/or insert');
Line: 2090

                 l_new_last_update_date_tab,
                 l_new_last_updated_by_tab,
                 l_new_last_update_login_tab,
                 l_new_program_app_id_tab,
                 l_new_program_id_tab,
                 l_new_program_update_date_tab,
                 l_new_request_id_tab
              LIMIT l_bulk_collect_size;
Line: 2135

                 FND_FILE.PUT_LINE(FND_FILE.log,'cleaning the temp update tables');
Line: 2138

                    WSH_DEBUG_SV.logmsg(l_module_name,'cleaning the temp update tables');
Line: 2141

                 l_u_origin_id_tab.DELETE;
Line: 2142

                 l_u_destination_id_tab.DELETE;
Line: 2143

                 l_u_identifier_type_tab.DELETE;
Line: 2144

                 l_u_distance_tab.DELETE;
Line: 2145

                 l_u_distance_uom_tab.DELETE;
Line: 2146

                 l_u_transit_time_tab.DELETE;
Line: 2147

                 l_u_transit_time_uom_tab.DELETE;
Line: 2148

                 l_u_last_update_date_tab.DELETE;
Line: 2149

                 l_u_last_updated_by_tab.DELETE;
Line: 2150

                 l_u_last_update_login_tab.DELETE;
Line: 2151

                 l_u_program_app_id_tab.DELETE;
Line: 2152

                 l_u_program_id_tab.DELETE;
Line: 2153

                 l_u_program_update_date_tab.DELETE;
Line: 2154

                 l_u_request_id_tab.DELETE;
Line: 2157

                 FND_FILE.PUT_LINE(FND_FILE.log,'cleaning the temp insert tables');
Line: 2160

                    WSH_DEBUG_SV.logmsg(l_module_name,'cleaning the temp insert tables');
Line: 2163

                 l_i_origin_id_tab.DELETE;
Line: 2164

                 l_i_destination_id_tab.DELETE;
Line: 2165

                 l_i_identifier_type_tab.DELETE;
Line: 2166

                 l_i_distance_tab.DELETE;
Line: 2167

                 l_i_distance_uom_tab.DELETE;
Line: 2168

                 l_i_transit_time_tab.DELETE;
Line: 2169

                 l_i_transit_time_uom_tab.DELETE;
Line: 2170

                 l_i_creation_date_tab.DELETE;
Line: 2171

                 l_i_created_by_tab.DELETE;
Line: 2172

                 l_i_last_update_date_tab.DELETE;
Line: 2173

                 l_i_last_updated_by_tab.DELETE;
Line: 2174

                 l_i_last_update_login_tab.DELETE;
Line: 2175

                 l_i_program_app_id_tab.DELETE;
Line: 2176

                 l_i_program_id_tab.DELETE;
Line: 2177

                 l_i_program_update_date_tab.DELETE;
Line: 2178

                 l_i_request_id_tab.DELETE;
Line: 2184

                 l_insert_ctr := 0;
Line: 2185

                 l_update_ctr := 0;
Line: 2194

                   FND_FILE.PUT_LINE(FND_FILE.log, 'checking for insert and update records');
Line: 2197

                      WSH_DEBUG_SV.logmsg(l_module_name,'checking for insert and update records');
Line: 2203

                       FND_FILE.PUT_LINE(FND_FILE.log, 'getting insert records');
Line: 2206

                          WSH_DEBUG_SV.logmsg(l_module_name,'getting insert records');
Line: 2213

                       l_insert_ctr := l_insert_ctr + 1;
Line: 2218

                       l_i_origin_id_tab(l_insert_ctr)           := l_new_origin_id_tab(kk);
Line: 2219

                       l_i_destination_id_tab(l_insert_ctr)      := l_new_destination_id_tab(kk);
Line: 2220

                       l_i_identifier_type_tab(l_insert_ctr)     := l_new_identifier_type_tab(kk);
Line: 2221

                       l_i_distance_tab(l_insert_ctr)            := l_new_distance_tab(kk);
Line: 2222

                       l_i_distance_uom_tab(l_insert_ctr)        := l_new_distance_uom_tab(kk);
Line: 2223

                       l_i_transit_time_tab(l_insert_ctr)        := l_new_transit_time_tab(kk);
Line: 2224

                       l_i_transit_time_uom_tab(l_insert_ctr)    := l_new_transit_time_uom_tab(kk);
Line: 2225

                       l_i_creation_date_tab(l_insert_ctr)       := l_new_creation_date_tab(kk);
Line: 2226

                       l_i_created_by_tab(l_insert_ctr)          := l_new_created_by_tab(kk);
Line: 2227

                       l_i_last_update_date_tab(l_insert_ctr)    := l_new_last_update_date_tab(kk);
Line: 2228

                       l_i_last_updated_by_tab(l_insert_ctr)     := l_new_last_updated_by_tab(kk);
Line: 2229

                       l_i_last_update_login_tab(l_insert_ctr)   := l_new_last_update_login_tab(kk);
Line: 2230

                       l_i_program_app_id_tab(l_insert_ctr)      := l_new_program_app_id_tab(kk);
Line: 2231

                       l_i_program_id_tab(l_insert_ctr)          := l_new_program_id_tab(kk);
Line: 2232

                       l_i_program_update_date_tab(l_insert_ctr) := l_new_program_update_date_tab(kk);
Line: 2233

                       l_i_request_id_tab(l_insert_ctr)          := l_new_request_id_tab(kk);
Line: 2238

                       FND_FILE.PUT_LINE(FND_FILE.log, 'getting update records');
Line: 2241

                          WSH_DEBUG_SV.logmsg(l_module_name,'getting update records');
Line: 2249

                       l_update_ctr := l_update_ctr + 1;
Line: 2254

                       l_u_origin_id_tab(l_update_ctr)           := l_old_origin_id_tab(kk);
Line: 2255

                       l_u_destination_id_tab(l_update_ctr)      := l_old_destination_id_tab(kk);
Line: 2256

                       l_u_identifier_type_tab(l_update_ctr)     := l_new_identifier_type_tab(kk);
Line: 2257

                       l_u_distance_tab(l_update_ctr)            := l_new_distance_tab(kk);
Line: 2258

                       l_u_distance_uom_tab(l_update_ctr)        := l_new_distance_uom_tab(kk);
Line: 2259

                       l_u_transit_time_tab(l_update_ctr)        := l_new_transit_time_tab(kk);
Line: 2260

                       l_u_transit_time_uom_tab(l_update_ctr)    := l_new_transit_time_uom_tab(kk);
Line: 2261

                       l_u_last_update_date_tab(l_update_ctr)    := l_new_last_update_date_tab(kk);
Line: 2262

                       l_u_last_updated_by_tab(l_update_ctr)     := l_new_last_updated_by_tab(kk);
Line: 2263

                       l_u_last_update_login_tab(l_update_ctr)   := l_new_last_update_login_tab(kk);
Line: 2264

                       l_u_program_app_id_tab(l_update_ctr)      := l_new_program_app_id_tab(kk);
Line: 2265

                       l_u_program_id_tab(l_update_ctr)          := l_new_program_id_tab(kk);
Line: 2266

                       l_u_program_update_date_tab(l_update_ctr) := l_new_program_update_date_tab(kk);
Line: 2267

                       l_u_request_id_tab(l_update_ctr)          := l_new_request_id_tab(kk);
Line: 2281

                 END LOOP;    -- END OF LOOP_02 (checking for insert and update records
Line: 2290

                    FND_FILE.PUT_LINE(FND_FILE.log, 'Bulk update of mileage records');
Line: 2293

                       WSH_DEBUG_SV.logmsg(l_module_name,'Bulk update of mileage records');
Line: 2300

                       UPDATE FTE_LOCATION_MILEAGES
                          SET    identifier_type        = l_u_identifier_type_tab(m),
                                 distance               = l_u_distance_tab(m),
                                 distance_uom           = l_u_distance_uom_tab(m),
                                 transit_time           = l_u_transit_time_tab(m),
                                 transit_time_uom       = l_u_transit_time_uom_tab(m),
                                 last_update_date       = l_u_last_update_date_tab(m),
                                 last_updated_by        = l_u_last_updated_by_tab(m),
                                 last_update_login      = l_u_last_update_login_tab(m),
                                 program_application_id = l_u_program_app_id_tab(m),
                                 program_id             = l_u_program_id_tab(m),
                                 program_update_date    = l_u_program_update_date_tab(m),
                                 request_id             = l_u_request_id_tab(m)
                          WHERE  origin_id = l_u_origin_id_tab(m)
                          AND    destination_id = l_u_destination_id_tab(m);
Line: 2323

                    FND_FILE.PUT_LINE(FND_FILE.log, 'Bulk insert of mileage records');
Line: 2326

                       WSH_DEBUG_SV.logmsg(l_module_name,'Bulk insert of mileage records');
Line: 2333

                       insert into FTE_LOCATION_MILEAGES(origin_id,
                                                         destination_id,
                                                         identifier_type,
                                                         distance,
                                                         distance_uom,
                                                         transit_time,
                                                         transit_time_uom,
                                                         creation_date,
                                                         created_by,
                                                         last_update_date,
                                                         last_updated_by,
                                                         last_update_login,
                                                         program_application_id,
                                                         program_id,
                                                         program_update_date,
                                                         request_id)
                                                  values(l_i_origin_id_tab(i),
                                                         l_i_destination_id_tab(i),
                                                         l_i_identifier_type_tab(i),
                                                         l_i_distance_tab(i),
                                                         l_i_distance_uom_tab(i),
                                                         l_i_transit_time_tab(i),
                                                         l_i_transit_time_uom_tab(i),
                                                         l_i_creation_date_tab(i),
                                                         l_i_created_by_tab(i),
                                                         l_i_last_update_date_tab(i),
                                                         l_i_last_updated_by_tab(i),
                                                         l_i_last_update_login_tab(i),
                                                         l_i_program_app_id_tab(i),
                                                         l_i_program_id_tab(i),
                                                         l_i_program_update_date_tab(i),
                                                         l_i_request_id_tab(i));
Line: 2393

        update fte_mile_download_files
        set    upload_date = l_cur_date,
               upload_id   = p_load_id
        where  download_file_id =  l_download_file_id;
Line: 2413

        delete fte_mile_download_lines
        where  download_file_id = l_download_file_id
        returning download_file_id BULK COLLECT INTO l_deleted_download_ids;
Line: 2445

           WSH_DEBUG_SV.logmsg(l_module_name,'The file has less lines than when it was created, i.e. lines from the file have been deleted, thus we cannot load, RAISE FTE_DIST_LESS_FILE_LINES exception');