945: END IF;
946:
947: BEGIN
948: SELECT count(*) INTO l_count
949: FROM as_forecast_prob_all_b fp
950: WHERE not exists (Select 'E' From as_forecast_prob_all_b ifp
951: Where ifp.probability_value = fp.probability_value
952: And ifp.org_id = 0);
953: EXCEPTION
946:
947: BEGIN
948: SELECT count(*) INTO l_count
949: FROM as_forecast_prob_all_b fp
950: WHERE not exists (Select 'E' From as_forecast_prob_all_b ifp
951: Where ifp.probability_value = fp.probability_value
952: And ifp.org_id = 0);
953: EXCEPTION
954: WHEN OTHERS THEN
959: l_err_total := l_err_total+1;
960: Write_log(l_module, ' ');
961: Write_log(l_module, 'Error('||to_char(l_err_total)
962: ||'): found sales stage, which has no set up for org_id=0, '
963: ||'in AS_FORECAST_PROB_ALL_B');
964: ELSE
965: Write_log(l_module, ' ');
966: Write_log(l_module, 'Success: no bad data found in AS_FORECAST_PROB_ALL_B');
967: END IF;
962: ||'): found sales stage, which has no set up for org_id=0, '
963: ||'in AS_FORECAST_PROB_ALL_B');
964: ELSE
965: Write_log(l_module, ' ');
966: Write_log(l_module, 'Success: no bad data found in AS_FORECAST_PROB_ALL_B');
967: END IF;
968:
969: ELSE
970: BEGIN