CREATE SEQUENCE customer_CUSTID_seq
INCREMENT BY 1
START WITH 1027
NOCACHE
NOCYCLE
table created
I created a sequence table using the method above, but i inserted rows in the sequence table which i created, with a method like this:-
INSERT INTO CUSTOMER (CUSTNAME,LASTNAME,MIDNAME,FIRSTNAME,STATE,SEX,ACCOUNT,SUBORDINATE,REGION
VALUES (customer_custid_seq.NEXTVAL,1020,'Franck','James','Mc''Lord','Ang','Male',000000993384847,'Godwin','East')
But i keep receiving this message all the time
Error starting at line 1 in command:
INSERT INTO CUSTOMER (CUSTID,LASTNAME,MIDNAME,FIRSTNAME,STATE,SEX,ACCOUNT,SUBORDINATE,REGION)
VALUES (customer_custid_seq.NEXTVAL, 1020,'Franck','James','Mc''Lord','Ang','Male',000000993384847,'Godwin','East')
Error at Command Line:1 Column:12
Error report:
SQL Error: ORA-00913: too many values
00913. 00000 - "too many values"
*Cause:
*Action:
Insert into sequence table
Page 1 of 12 Replies - 851 Views - Last Post: 16 September 2011 - 02:26 PM
Replies To: Insert into sequence table
#2
Re: Insert into sequence table
Posted 14 September 2011 - 05:00 AM
You've specified 9 columns but really you're trying to enter 10. From the looks of it you want the sequence to create the customer's id. I'd suggest removing the value 1020 since I see no clear reason for it.
#3
Re: Insert into sequence table
Posted 16 September 2011 - 02:26 PM
If this is a SQL table then you could, instead, create a identity column that starts at 1027...
Is this what you're needing?
Create table mytable (TableKey int identity(1027,1) ,col1 int ,col2 datetime... etc. )
Is this what you're needing?
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|