Hi Everyone,
I just bought myself a lottery ticket and as I was driving home why not write a small program to generate my own numbers? I came up with the following but I can't seem to figure out why I am getting the following error:
PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
code below.
declare
lot_num integer;
fst_num integer;
sec_num integer;
thrd_num integer;
begin
for lot in 1..3
loop
select dbms_random.value(00, 59) num into lot_num from dual;
If fst_num is null then
lot_num := fst_num;
elsif sec_num is null then
lot_num := sec_num;
elsif thrd_num is null then
lot_num := thrd_num;
end if;
end loop;
dbms_output.put_line(fst_num, sec_num, thrd_num); <==== It complains about this line. I tried the index named "lot" and the lot_num as a reference but no luck.
end;
/
Thanks for your help in advance.
Regards,
Al