File
154330259383.jpg
- (455.74KB
, 2539x1459
, 1445728771441.jpg
)
Why the fuck wont this run? it runs fine when i put in a number for the interval but not when i put in left or right input. they should just be numbers so whats the big deal?
SET serveroutput ON
ACCEPT leftLimitInput NUMBER PROMPT "Please enter the leftLimit in minutes: ";
ACCEPT rightLimitInput NUMBER PROMPT "Please enter the rightLimit in minutes: ";
DECLARE
leftLimit NUMBER;
rightLimit NUMBER;
BEGIN
leftLimit := &leftLimitInput;
rightLimit := &rightLimitInput;
SELECT flightno, fromAirport, toAirport, (arrives-depart) AS flightDuration FROM flights WHERE (arrives-depart) >= INTERVAL 'leftLimitInput' MINUTE AND (arrives-depart) <= INTERVAL 'rightLimitInput' MINUTE;
END;
/