My code is somthing like this(not exact)
-----------------------------------------------
cnumber number;
CURSOR c1
IS
SELECT course_number
from courses
where course_name = name_in;
open c1;
fetch c1 into cnumber;
if c1%notfound then
cnumber := 9999;
end if;
close c1;
----------------------------------------------------
whn i try to
test this in TOAD by running it as a script, i get invalid sql statment error.
Do i need to wrap this block of code inside a procedur or function t run it as ascript?
Thanks