-
I have a script that has a loop up 120,000 times of inserting data. For some reason,
it input up to 99,000 and gives me error. How can I fix it?
ERROR at line 1:
ORA-01401: inserted value too large for column
ORA-06512: at line 8
for i IN 1..120,000 LOOP
INSERT statement....
-
Your target column is not large enough.
Jeff Hunter
-
the empno can hold up to 10 digits. I cannot undestand why it does not accept
after 99,000 input.
SQL> desc employee
Name Null? Type
--------------------------------------- ---------- -------- -----------------
EMPNO NOT NULL NUMBER(10)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
FOR i IN 1..120000 LOOP
INSERT INTO a.employee
VALUES (i, 'ADAMS' || to_char(i), 'CLERK', 7788, sysdate, 1100, NULL,
20);
-
Originally posted by Trina
the empno can hold up to 10 digits. I cannot undestand why it does not accept
after 99,000 input.
SQL> desc employee
Name Null? Type
--------------------------------------- ---------- -------- -----------------
EMPNO NOT NULL NUMBER(10)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
FOR i IN 1..120000 LOOP
INSERT INTO a.employee
VALUES (i, 'ADAMS' || to_char(i), 'CLERK', 7788, sysdate, 1100, NULL,
20);
Your problem is with the ENAME column. 'ADAMS100000' is bigger than 10 chars.
Jeff Hunter
-
thank you Jeff. I keep looking at empno.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|