Question
can not run procedure......please find...... please try and provide correct run screenshot.... before the answer is not correct....... CREATE OR REPLACE PROCEDURE make_reservation( a_s_date IN
can not run procedure......please find...... please try and provide correct run screenshot.... before the answer is not correct.......
CREATE OR REPLACE PROCEDURE make_reservation( a_s_date IN DATE, a_e_date IN DATE, a_c_id IN VARCHAR2, a_v_id IN VARCHAR2, a_e_budget IN NUMBER, p_res_id OUT VARCHAR2 ) IS l_res_id CHAR(20); l_dob DATE; BEGIN SELECT dob INTO l_dob FROM client WHERE c_id = a_c_id;
IF MONTHS_BETWEEN(SYSDATE, l_dob)
SELECT NVL(MAX(res_id), 0) + 1 INTO l_res_id FROM reservations; INSERT INTO reservations (res_id, s_date, e_date, c_id, v_id, t_cost) VALUES (l_res_id, a_s_date, NULL, TO_NUMBER(a_c_id), TO_NUMBER(a_v_id), a_e_budget * (a_e_date - a_s_date + 1));
p_res_id := l_res_id;
DBMS_OUTPUT.PUT_LINE('Reservations registered successfully with id ' || l_res_id); END;
ORA-01403: no data found ORA-06512: at "SQL_XWQHXYSMRYZNUHWSQLMADCTLY.MAKE_RESERVATION", IIne 13 ORA-06512: at line 4 ORA-06512: at "SYS.DBMS_SQL", line 1721
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started