Friday, September 11, 2009

RANGE INPUT RESTRICTION

BEGIN
FOR cur_r IN (SELECT frm_vin, to_vin
FROM vin_upd
WHERE gr_sub_cd = :BLOCK.gr_sub_cd) LOOP
IF :BLOCK.frm_vin BETWEEN cur_r.frm_vin AND cur_r.to_vin
OR :BLOCK.to_vin BETWEEN cur_r.frm_vin AND cur_r.to_vin THEN
MESSAGE ('Invalid range');
RAISE form_application_error;
END IF;
END LOOP;
END;

No comments: