Answer the question
In order to leave comments, you need to log in
Please look at the code and point out the error in the code?
in general, I have one query where I get a certain number of dates, then in another query, using a cursor and a loop, I want to display certain values based on these dates, but in order to understand the queries themselves, I wanted to build a small example
create global temporary
table dep_salary2
on commit preserve rows
as select distinct department_id, hire_date from hr.employees where salary > 9000 and hire_date = '04.03.04';
declare
cursor c is select * from test_m;
begin
open c;
loop
fetch c into line;
select department_id from hr.employees where hire_date = DAT;
exit when c%notfound;
end loop;
close c;
end;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question