DBA Data[Home] [Help]

APPS.MSD_DEM_UPLOAD_FORECAST SQL Statements

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

Line: 95

         x_sql := 'SELECT tql.lorder ' ||
                     ' FROM ' || x_table_name || ' tql, ';
Line: 156

         x_sql := 'SELECT cf.computed_name ' ||
                  '   FROM ' || x_table_name || ' tqs, ';
Line: 222

      x_sql := 'SELECT tg_res, months_number, inputs_column, is_default ' ||
               '   FROM ' || x_tgroup_res ||
               '   WHERE tg_res_id = ' || p_time_res;
Line: 238

      x_sql := 'SELECT time_bucket, aggregation_method ' ||
               '   FROM ' || x_dm_wiz_dm_def ||
               '   WHERE  dm_or_template = 2 ' ||
               '      AND is_active = 1 ' ||
               '      AND rownum < 2 ';
Line: 353

      p_time_from_clause := ' (SELECT min(datet) start_time, max(datet) end_time ' ||
                            '      FROM ' || x_inputs || ' GROUP BY ' || x_inputs_column ||
                            ' ) inp ';
Line: 391

         x_sql := 'SELECT count(*) FROM ' || x_inputs || ' WHERE ' || x_inputs_column || ' = 1 ';
Line: 421

            SELECT min(instance_id)
               FROM msc_apps_instances
               WHERE  instance_type <> 3
                  AND validation_org_id IS NOT NULL;
Line: 597

            SELECT mtil.sr_tp_id
               INTO x_sr_customer_pk
               FROM
                  msc_tp_id_lid mtil
               WHERE
                      mtil.sr_cust_account_number = x_account_number
                      and mtil.sr_instance_id = p_sr_instance_id;
Line: 635

            SELECT mr.region_id
               INTO x_sr_zone_pk
               FROM msc_regions mr
               WHERE
                      mr.zone = x_zone
                  AND mr.sr_instance_id = p_sr_instance_id;
Line: 715

         x_select_clause	VARCHAR2(3000)  := NULL;
Line: 718

         x_insert_clause	VARCHAR2(1000)	:= NULL;
Line: 772

         x_sql := 'SELECT id, presentation_type, view_name, ' ||
                     ' time_res_id, unit_id, index_id, data_scale, ' ||
                     ' integration_type, export_type, last_export_date ' ||
                     ' FROM ' || x_table_name ||
                     ' WHERE upper(query_name) = ''' || x_export_data_profile || '''';
Line: 792

         x_sql := 'SELECT count(1) FROM all_views ' ||
                     ' WHERE owner = upper(''' || x_schema || ''')' ||
                     '   AND view_name = upper(''' || x_view_name || ''')';
Line: 826

         x_select_clause := ' SELECT ' || x_demand_plan_id || ' , ' ||
                                          x_scenario_id || ' , ' ||
                            '             rownum - 1 , ';
Line: 847

         x_select_clause := x_select_clause || x_bucket_type || ' , '
                                            || x_start_time || ' , '
                                            || x_end_time || ' , ';
Line: 875

         x_select_clause := x_select_clause || ' msi.sr_instance_id, ';
Line: 896

         x_select_clause := x_select_clause || x_sr_organization_id || ' , ' ||
                                             ' msi.sr_inventory_item_id, ';
Line: 948

         x_select_clause := x_select_clause || x_sr_ship_to_loc_id || ' , ' ||
                                               x_sr_customer_id || ' , ' ||
                                               x_sr_zone_id || ' , ';
Line: 969

         x_select_clause := x_select_clause || x_sr_demand_class || ' , ' ||
                                             ' msi.inventory_item_id, ';
Line: 974

         x_select_clause := x_select_clause || '''' || x_uom_code || ''', ' ||
                                             ' msi.uom_code, ';
Line: 978

         x_select_clause := x_select_clause || ' msi.list_price * ((100 - msi.average_discount)/100), ';
Line: 1002

         x_select_clause := x_select_clause || x_quantity || ' , ';
Line: 1009

            x_select_clause := x_select_clause || ' NULL , NULL , ';
Line: 1017

            x_select_clause := x_select_clause || '''' || x_error_type || ''' , exp.' || x_error_column || ' , ';
Line: 1025

            x_select_clause := x_select_clause || ' NULL , ';
Line: 1027

            x_select_clause := x_select_clause || ' exp.' || x_demand_priority_column || ' , ';
Line: 1030

         x_select_clause := x_select_clause || ' sysdate, ' ||
                                               ' FND_GLOBAL.USER_ID, ' ||
                                               ' FND_GLOBAL.LOGIN_ID ';
Line: 1123

         x_insert_clause := 'INSERT INTO MSD_DP_SCN_ENTRIES_DENORM ( ' ||
                            '   DEMAND_PLAN_ID, ' ||
                            '   SCENARIO_ID, ' ||
                            '   DEMAND_ID, ' ||
                            '   BUCKET_TYPE, ' ||
                            '   START_TIME, ' ||
                            '   END_TIME, ' ||
                            '   SR_INSTANCE_ID, ' ||
                            '   SR_ORGANIZATION_ID, ' ||
                            '   SR_INVENTORY_ITEM_ID, ' ||
                            '   SR_SHIP_TO_LOC_ID, ' ||
                            '   SR_CUSTOMER_ID, ' ||
                            '   SR_ZONE_ID, ' ||
                            '   DEMAND_CLASS, ' ||
                            '   INVENTORY_ITEM_ID, ' ||
                            '   DP_UOM_CODE, ' ||
                            '   ASCP_UOM_CODE, ' ||
                            '   UNIT_PRICE, ' ||
                            '   QUANTITY, ' ||
                            '   ERROR_TYPE, ' ||
                            '   FORECAST_ERROR, ' ||
                            '   PRIORITY, ' ||
                            '   CREATION_DATE, ' ||
                            '   CREATED_BY, ' ||
                            '   LAST_UPDATE_LOGIN )';
Line: 1149

         x_large_sql := x_insert_clause || x_select_clause || x_from_clause || x_where_clause;
Line: 1151

         /* Delete all data in the denorm for the export data profile */
         DELETE FROM MSD_DP_SCN_ENTRIES_DENORM
         WHERE demand_plan_id = x_demand_plan_id
            AND scenario_id = x_scenario_id;
Line: 1156

         /* Insert forecast data into denorm table */
         EXECUTE IMMEDIATE x_large_sql;