Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem inserting test data

Status
Not open for further replies.

slok

Programmer
Jul 2, 1999
108
SG
I have a table driver as follows

Name Null? Type
----------------------------------------- -------- -------------
DRV_LIC_NO NOT NULL CHAR(10)
DRV_NAME NOT NULL CHAR(30)
DRV_STREET NOT NULL CHAR(20)
DRV_POSTCODE NOT NULL CHAR(20)
DRV_DOB NOT NULL DATE
LIC_TYPE NOT NULL CHAR(10)
LIC_EXP_DATE NOT NULL DATE
LIC_STATUS NOT NULL CHAR(1)
SUSP_CEASE_DATE DATE



However, I encounter errors while trying to insert test data.
Error message says
"ERROR at line 1:
ORA-00947: not enough values"


My test data are as follows
==
insert into driver values ('ABC1234567', 'Ben Teng', 'Bedok St', '123456', '1 Jan 1974', 'Class A', '1 Jan 2003', 'A');
insert into driver values ('DEF1234567', 'Freddie Foo', 'Cashew Heights', '223456', '1 Jan 1973', 'Class A', '1 Jan 2003', 'A');
insert into driver values ('GHI1234567', 'Gong Gong', 'Beng Heights', '445456', '1 Jan 1970', 'Class A', '1 Jan 2003', 'S', '1 April 2002');

==
 
managed to find the problem. problem solved.
 
Please post your fix. It may help someone in the future... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
ok, essentially I have forgotten to include values for the last field in the first 2 inserts.

So, changing it to this will work.
Note the last field which is just empty string.

==
insert into driver values ('ABC1234567', 'Ben Teng', 'Bedok St', '123456', '1 Jan 1974', 'Class A', '1 Jan 2003', 'A', '');
insert into driver values ('DEF1234567', 'Freddie Foo', 'Cashew Heights', '223456', '1 Jan 1973', 'Class A', '1 Jan 2003', 'A', '');
 
Thanks... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top