Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.
PROCEDURE SAVE_ORDER ( p_ord_date IN VARCHAR2 DEFAULT NULL, p_stockno IN TYPES.ARRAY DEFAULT TYPES.EMPTY_ARRAY, p_flag IN TYPES.ARRAY DEFAULT TYPES.EMPTY_ARRAY) AS missing_Y_items exception; records_found boolean default false; BEGIN /* I need to check if there are any records submitted with flag set to "Y". If there are no records, raise an exception with alert that no records are eligible. */ FOR i IN 1..p_stockno.COUNT LOOP IF p_flag(i) = 'Y' THEN save records..... records_found := TRUE; END IF; END LOOP; IF (records_found := FALSE) THEN RAISE missing_Y_items; END IF; END;