I have a function that has three parameters(v-mid,P_product_id, n). Inside that function I need to call another function called top_related_prod_type2 that have the same three parameters that were passed to the main function. The synatx around it looks like this:
if v_no_of_records < n then
TOP_RELATED_PROD_TYPE2(v_mid, n - v_no_of_records, p_product_id);
else
for rec_index in x loop
v_current_rec := v_current_rec + 1;
if v_current_rec = n then
return rec_index.product_id;
end if;
end loop;
end if;
v_no_of_records is a variable I define earlier. The problem is it keeps giving me the "TOP RELATED_PROD_TYPE2 is not a procedure or is not define" error. I tried putting execute immediate in front of it, and still gave me an error. Any ideas?
Thanks for the help.
if v_no_of_records < n then
TOP_RELATED_PROD_TYPE2(v_mid, n - v_no_of_records, p_product_id);
else
for rec_index in x loop
v_current_rec := v_current_rec + 1;
if v_current_rec = n then
return rec_index.product_id;
end if;
end loop;
end if;
v_no_of_records is a variable I define earlier. The problem is it keeps giving me the "TOP RELATED_PROD_TYPE2 is not a procedure or is not define" error. I tried putting execute immediate in front of it, and still gave me an error. Any ideas?
Thanks for the help.