我的 pl/sql 过程中出现 ORA-06532 错误。它与我的数组有关,它似乎发生在以“term_1 := ...”开头的行上。选择进入的查询有 7 条记录,因此它应该与我要求的数量相同。我对 SQL 数组有点陌生,所以我可能错过了一些明显的东西。任何帮助表示赞赏,谢谢。
DECLARE
listOfTerms VC50_ARRAY;
term_1 varchar2(30);
term_2 varchar2(30);
term_3 varchar2(30);
term_4 varchar2(30);
term_5 varchar2(30);
term_6 varchar2(30);
term_7 varchar2(30);
BEGIN
SELECT apl.awdp_acad_terms
BULK COLLECT INTO listOfTerms
FROM fa_years fay
JOIN award_periods_ls apl
ON apl.award_periods_id = fay.award_periods_id
WHERE (SELECT b.awdp_fa_year as faYear
FROM award_periods_ls a
JOIN coll18_test.fa_years b ON a.award_periods_id = b.award_periods_id
WHERE awdp_acad_terms = v_ug_term) = fay.awdp_fa_year
ORDER BY apl.awdp_acad_terms DESC;
term_1 := listOFTerms(1);
term_2 := listOFTerms(2);
term_3 := listOFTerms(3);
term_4 := listOFTerms(4);
term_5 := listOFTerms(5);
term_6 := listOFTerms(6);
term_7 := listOFTerms(7);