Алексей Коровкин
Ученик
(26)
4 года назад
Ошибка в V_emprec c_emp%ROWYPE
Пиши V_emprec c_emp%_OUTPUT.%ROWYPE
www.itgold.czУченик (111)
4 года назад
Ошибка:
ORA-06550: line 10, column 16:
PLS-00103: Encountered the symbol "_" when expecting one of the following:
type
1. DECLARE
2. CURSOR c_dept IS
3. SELECT department_id, department_name
CURSOR c_dept IS
SELECT department_id, department_name
FROM departments;
CURSOR c_emp(p_deptid NUMBER) IS
SELECT first_name, last_name, salary
FROM emloyees
WHERE department_id = p_deptid;
V_deptrec c_dept%ROWTYPE;
V_emprec c_emp%ROWYPE;
BEGIN
OPEN c_dept;
LOOP
FETCH c_dept INTO v_deptrec;
EXIT WHEN c_dept%NOTFOUND;
DBMS_OUTPUT.PUT_LINE('---------------------');
LOOP
FETCH c_emp INTO v_emprec;
EXIT WHEN c_emp%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(v_emprec.last_name||' '||v_emprec_first_name||' '||v_emprec.salary);
END LOOP;
CLOSE c_emp;
DBMS_OUTPUT.PUT_LINE('');
CLOSE c_dept;
END;
Ошибка: ORA-06550: line 28, column 4:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
loop
1. DECLARE
2. CURSOR c_dept IS
3. SELECT department_id, department_name
4. FROM departments;