DBA Data[Home] [Help]

APPS.AR_CMGT_SCORING_ENGINE SQL Statements

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

Line: 37

            SELECT  max(scores)
            INTO    l_max_score
            FROM    ar_cmgt_score_dtls
            WHERE   score_model_id = p_score_model_id
            AND     data_point_id  = p_data_point_id;
Line: 69

	    SELECT RETURN_DATA_TYPE,RETURN_DATE_FORMAT
            INTO   l_data_point_type,l_date_format
            FROM   AR_CMGT_SCORABLE_DATA_POINTS_V
            WHERE  DATA_POINT_ID = p_data_point_id;
Line: 95

				--change for selecting 0 in case weight is null i.e. not assigned
				-- IF the user has choosen convert the null value to zero.
				IF p_data_point_value IS NULL
				THEN

				BEGIN

           			SELECT NULL_ZERO_FLAG
           			INTO NULL_ZERO_CONVR_IND
           			FROM AR_CMGT_SCORES
           			WHERE SCORE_MODEL_ID = p_score_model_id;
Line: 148

           	SELECT score.scores, NVL(weight.weight,0)
            	INTO   l_scores, l_weight
            	FROM   ar_cmgt_score_dtls score,
                   	   AR_CMGT_SCORE_WEIGHTS weight
            	WHERE  score.score_model_id = p_score_model_id
            	AND    score.data_point_id = p_data_point_id
            	AND    score.score_model_id = weight.score_model_id
            	AND    score.data_point_id = weight.data_point_id
            --	AND    score.num_char_flag = 'N'
            	AND    to_number(l_data_point_value) between score.range_from and score.range_to;
Line: 159

	    --output.put_line('score selected  = ' ||l_scores);
Line: 160

	    --output.put_line('weight selected   = ' || l_weight);
Line: 193

            	SELECT score.scores, NVL(weight.weight,0)
                INTO   l_scores, l_weight
                FROM   ar_cmgt_score_dtls score,
                       AR_CMGT_SCORE_WEIGHTS weight
            	WHERE  score.score_model_id = p_score_model_id
            	AND    score.data_point_id = p_data_point_id
            	AND    score.score_model_id = weight.score_model_id
            	AND    score.data_point_id = weight.data_point_id
            --	AND    score.num_char_flag = 'D'
            	AND    to_date(p_data_point_value,l_date_format) between
					    to_date(score.range_from,l_date_format)
					    and to_date(score.range_to,l_date_format);
Line: 233

            	SELECT score.scores, NVL(weight.weight,0)
            	INTO   l_scores, l_weight
            	FROM   ar_cmgt_score_dtls score,
                	   AR_CMGT_SCORE_WEIGHTS weight
            	WHERE  score.score_model_id = p_score_model_id
            	AND    score.data_point_id = p_data_point_id
            	AND    score.score_model_id = weight.score_model_id
            	AND    score.data_point_id = weight.data_point_id
            --	AND    score.num_char_flag = 'C'
            	AND    p_data_point_value between score.range_from and score.range_to;
Line: 300

        SELECT 'X'
        INTO   l_result
        FROM ar_cmgt_scores score, ar_cmgt_case_folders case1
        WHERE  case1.case_folder_id = p_case_folder_id
        AND    score.score_model_id = p_score_model_id
        AND    case1.limit_currency = score.currency
        AND    trunc(sysdate) between trunc(score.start_date) and
                   nvl(trunc(score.end_date), trunc(sysdate));
Line: 328

            Select data_point_category
	    into l_category
	    from ar_cmgt_scorable_data_points_v
	    where data_point_id =p_data_point_id;
Line: 334

	         SELECT INCLUDED_IN_CHECKLIST
	         INTO l_chk_list
	         FROM AR_CMGT_CF_DTLS
	         WHERE CASE_FOLDER_ID=p_case_folder_id
	         AND DATA_POINT_ID=p_data_point_id;
Line: 353

	    --only update the other data points
	    --i.e. 'ADDITIONAL' data points are
	    --not updated from PLSQL.

	    if l_updt_flag ='Y' THEN

            Update ar_cmgt_cf_dtls
             set data_point_value = p_data_point_value,
                 score = l_score
	    WHERE data_point_id = p_data_point_id
            AND   case_folder_id = p_case_folder_id;
Line: 399

    SELECT  source_table_name, source_column_name
    INTO    l_source_table_name, l_source_column_name
    FROM    ar_cmgt_dnb_elements_vl
    WHERE   data_element_id = p_data_point_id;
Line: 404

    SELECT  cfd.source_key, cfd.source_key_type, cfd.source_key_column_name,
            cfd.source_key_column_type_name
    INTO    l_source_key, l_source_key_type, l_source_key_column_name,
            l_source_key_column_type
    FROM    ar_cmgt_cf_dnb_dtls cfd
    WHERE   cfd.case_folder_id = p_case_folder_id
    AND     cfd.source_table_name = l_source_table_name;
Line: 416

        queryStr := 'SELECT '|| ':l_source_column_name' ||
                 ' FROM '|| ':l_source_table_name' ||
                 ' WHERE '|| ':l_source_key_column_name' || ' = :l_source_key';
Line: 431

        queryStr := 'SELECT '||':l_source_column_name' ||
                 ' FROM '|| ':l_source_table_name' ||
                 ' WHERE '|| ':l_source_key_column_name' || ' =  :l_source_key '||
                 ' AND ' || ':l_source_key_column_type' ||' = || :l_source_key_type';
Line: 471

        SELECT data_point_category
	INTO l_category
	FROM ar_cmgt_scorable_data_points_v
	where data_point_id = p_data_point_id;
Line: 492

            SELECT data1.case_folder_id
            INTO  g_data_case_folder_id
            FROM  ar_cmgt_case_folders data1, ar_cmgt_case_folders case1
            WHERE data1.type = 'DATA'
            and    case1.case_folder_id = p_case_folder_id
            and    case1.party_id = data1.party_id
            and    case1.cust_account_id = data1.cust_account_id
            and    case1.site_use_id   = data1.site_use_id;
Line: 506

            UPDATE  ar_cmgt_cf_dtls
            SET     score = null,
                    last_updated_by = fnd_global.user_id,                    last_update_date = sysdate,
                    last_update_login = fnd_global.login_id
            WHERE   case_folder_id = g_data_case_folder_id;
Line: 522

                SELECT data_point_value
                INTO   l_data_point_value
                FROM   ar_cmgt_cf_dtls
                WHERE  case_folder_id = p_case_folder_id
                AND    data_point_id =  p_data_point_id;
Line: 559

                SELECT data_point_value
                INTO   l_data_point_value
                FROM   ar_cmgt_cf_dtls
                WHERE  case_folder_id = p_case_folder_id
                AND    data_point_id =  p_data_point_id;
Line: 593

   This code is chanded to update only in case the data point category is not
   ADDITIONAL.*/
                IF l_updt_flg ='Y'
		THEN
                AR_CMGT_CONTROLS.UPDATE_CASE_FOLDER_DETAILS
                        (   p_case_folder_id    => p_case_folder_id,
                            p_data_point_id     => p_data_point_id,
                            p_data_point_value  => l_data_point_value,
                            p_score             => l_score,
                            p_errmsg            => p_error_msg,
                            p_resultout         => p_resultout);
Line: 613

                    AR_CMGT_CONTROLS.UPDATE_CASE_FOLDER_DETAILS
                        (   p_case_folder_id    => g_data_case_folder_id,
                            p_data_point_id     => p_data_point_id,
                            p_data_point_value  => l_data_point_value,
                            p_score             => l_score,
                            p_errmsg            => p_error_msg,
                            p_resultout         => p_resultout);
Line: 649

        SELECT distinct score.data_point_id, score.score_model_id
        FROM   ar_cmgt_score_dtls score,
               ar_cmgt_case_folders case1
        WHERE  case_folder_id = p_case_folder_id
        AND    case1.score_model_id = score.score_model_id;
Line: 669

    UPDATE  ar_cmgt_cf_dtls
    SET     score = null,
            last_updated_by = fnd_global.user_id,
            last_update_date = sysdate,
            last_update_login = fnd_global.login_id
    WHERE   case_folder_id = p_case_folder_id;
Line: 724

        SELECT distinct score.data_point_id, score.score_model_id
        FROM   ar_cmgt_score_dtls score
        WHERE  score_model_id = p_score_model_id;
Line: 743

        SELECT 'X'
        INTO   l_result
        FROM ar_cmgt_scores score, ar_cmgt_case_folders case1
        WHERE  case1.case_folder_id = p_case_folder_id
        AND    score.score_model_id = p_score_model_id
        AND    case1.limit_currency = score.currency
        AND    trunc(sysdate) between trunc(score.start_date) and
                   nvl(trunc(score.end_date), trunc(sysdate));
Line: 772

    UPDATE  ar_cmgt_cf_dtls
    SET     score = null,
            last_updated_by = fnd_global.user_id,
            last_update_date = sysdate,
            last_update_login = fnd_global.login_id
    WHERE   case_folder_id = p_case_folder_id;
Line: 782

    /* UPDATE ar_cmgt_case_folders
      set score_model_id = p_score_model_id,
          last_updated = SYSDATE,
          last_update_date = sysdate,
          last_updated_by = fnd_global.user_id,
          last_update_login = fnd_global.login_id
    WHERE case_folder_id = p_case_folder_id;  */