立即执行期间的报价问题



立即执行的语法错误

select distinct hire_date BULK COLLECT into v_yr from employees;

for i in 1..v_yr.count LOOP


v_1:='select * from employees where EXTRACT(YEAR FROM TO_DATE(HIRE_DATE,'''
||DD-MM-RR
||'''
||'=:1';
open c_emp for v_1 using v_yr(i);

也许是这样?

select distinct extract(year from hire_date)
bulk collect into v_yr
from employees;

for i in 1..v_yr.count loop
for c_emp in (select *
from employees
where extract(year from hire_date) = v_yr(i)) loop
.
.
.
end loop;
end for;

相关内容

  • 没有找到相关文章

最新更新