errrrrrrrrrwhat
errrrrrrrrrwhat

Reputation: 3

SQL unable to insert data

I've been trying to insert data in a database table, however I keep getting an the error "ORA-01747: invalid user.table.column, table.column, or column specification"

The table I trying to input data into;

CREATE
TABLE LOT
(
Lot_ID         INTEGER NOT NULL ,
Reserve_Prices NUMBER NOT NULL ,
Asking_prices NUMBER NOT NULL ,
Selling_prices NUMBER NOT NULL ,
Authorship     VARCHAR2 (200) NOT NULL ,
Origin         VARCHAR2 (200) ,
Age           INTEGER ,
"Size" VARCHAR2 (200) ,   
Condition VARCHAR2 (200) ,
Authenticity VARCHAR2 (200) ,
Description              VARCHAR2 (200) ,
Sold                     VARCHAR2 (3) NOT NULL ,
INVOICE_Invoice_ID       INTEGER NOT NULL ,
EVENT_Location_ID        INTEGER NOT NULL ,
SELLER_Seller_ID         INTEGER NOT NULL ,
AUCTIONEER_Auctioneer_ID INTEGER NOT NULL ,
BIDDER_Bidder_ID         INTEGER NOT NULL
 ) ;
 ALTER TABLE LOT ADD CONSTRAINT LOT_PK PRIMARY KEY ( Lot_ID ) ;

the insert statements;

Insert into lot (lot_ID,Reserve_Prices,Asking_prices,Selling_prices,Authorship,Origin,Age,"Size",Condition,Authenticity,Description,Sold,INVOICE_Invoice_ID,EVENT_Location_ID,SELLER_Seller_ID,AUCTIONEER_Auctioneer_ID,BIDDER_Bidder_ID,) values (001,1000,1000,1000,'unknown','unknown',200,'small','good','authentic','a small ceramic teacup','yes',001,001,001,001,001);
Insert into lot (lot_ID,Reserve_Prices,Asking_prices,Selling_prices,Authorship,Origin,Age,"Size",Condition,Authenticity,Description,Sold,INVOICE_Invoice_ID,EVENT_Location_ID,SELLER_Seller_ID,AUCTIONEER_Auctioneer_ID,BIDDER_Bidder_ID,) values (002,2500,2500,2500,'unknown','US',15,'large','good','unknown','senator ring','no',002,002,002,002,002);
Insert into lot (lot_ID,Reserve_Prices,Asking_prices,Selling_prices,Authorship,Origin,Age,"Size",Condition,Authenticity,Description,Sold,INVOICE_Invoice_ID,EVENT_Location_ID,SELLER_Seller_ID,AUCTIONEER_Auctioneer_ID,BIDDER_Bidder_ID,) values (003,100,100,100,'ships and Co.','London',200,'medium','poor','authentic','Ships and Co. medicine box','yes',003,003,003,003,003);

this code works for every other table but when running this one I only get an error

Upvotes: 0

Views: 124

Answers (2)

travis_91
travis_91

Reputation: 173

Check this BIDDER_Bidder_ID, You've insert a comma in the end of insert query.. fix this removing the last comma

Upvotes: 0

TrevorGoodchild
TrevorGoodchild

Reputation: 1058

In your individual insert statements, you have an extra comma after BIDDER_Bidder_ID in your field declarations, so it's looking for another field that isn't being specified. Try removing those commas.

Upvotes: 3

Related Questions