Home » SQL & PL/SQL » SQL & PL/SQL » Error ORA-00947(not enough values)
Error ORA-00947(not enough values) [message #250924] Wed, 11 July 2007 16:45 Go to next message
vamcs
Messages: 20
Registered: June 2007
Location: somerset
Junior Member

ORA-00947 is occuring for the insert statement.
The sample code as follows

DECLARE
CURSOR s_cur IS
SELECT c1,c2,c3,c4
FROM demo;
TYPE fetch_array IS TABLE OF s_cur%ROWTYPE;
s_array fetch_array;
BEGIN
OPEN s_cur;
LOOP
FETCH s_cur BULK COLLECT INTO s_array LIMIT 1000;
FORALL i IN 1..s_array.COUNT
INSERT INTO demo (c1,c2,c3,c4) VALUES s_array(i); ----- ORA-00947
EXIT WHEN s_cur%NOTFOUND;
END LOOP;
CLOSE s_cur;
COMMIT;
END;

[Updated on: Wed, 11 July 2007 16:48]

Report message to a moderator

Re: Error ORA-00947(not enough values) [message #250974 is a reply to message #250924] Thu, 12 July 2007 01:53 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow How to format your posts and How to get a quick answer to your question: TIPS AND TRICKS
Make sure that lines of code do not exceed 80 or 100 characters when you format.
Please always post your Oracle version (4 decimals).

You have to name each field of your record.

Regards
Michel
Previous Topic: HELP on Reading ZIP File contents using PL/SQL
Next Topic: query required
Goto Forum:
  


Current Time: Fri Dec 09 15:53:47 CST 2016

Total time taken to generate the page: 0.13263 seconds