Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Why am I getting Oracle error PL / SQL: ORA - 0 0 9 4 2 : table or view does not exist for this

Why am I getting Oracle error PL/SQL: ORA-00942: table or view does not exist for this PL/SQL, when I have already confirmed that the table exists?
Declare
rows_inserted integer :=0;
Begin
LOOP
Begin
INSERT INTO employee(employee_id, last_name, department_id)
VALUES(emp_id_seq.NEXTVAL, concat('EMPLNAME',to_char(rows_inserted)),123);
--
--Only increment counter when no duplicate exception
--
rows_inserted := rows_inserted +1;
Exception When DUP_VAL_ON_INDEX Then Null;
End;
exit when rows_inserted =500;
commit;
END LOOP;
End;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions