| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Newbie PL/SQL Question
Hey Folks,
I'm just starting to learn a little PL/SQL (enough to be dangerous). I was trying to create a simple package that referenced the hr.emp_details_view example view. Unfortunately, I get the following error in reference to this view:
PL/SQL: ORA-00942: table or view does not exist
I'm thinking this is a scope or permissions issue since I seem to be able to access this table using a straight SQL query, but I'm not sure what I need to do to correct it. Any suggestions?
Thanks,
PROCEDURE pl(message VARCHAR2);
PROCEDURE emp_details;
END test_package;
/
PROCEDURE pl(message VARCHAR2)
IS
BEGIN
DBMS_OUTPUT.PUT_LINE(message);
END pl;
PROCEDURE emp_details
IS
BEGIN
pl('emp_details stub()');
FOR emps IN
(SELECT first_name, last_name, city, country_name, salary
FROM hr.emp_details_view)
LOOP
<<list_details>>
pl(emps%ROWCOUNT || ') ' ||
emps.first_name || ', ' ||
emps.last_name || ', ' ||
emps.city || ', ' ||
emps.country_name || ', ' ||
emps.salary );
END test_package;
/
Received on Sun Mar 09 2003 - 23:02:19 CST
![]() |
![]() |