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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting the following error ORA-00928 !!!!

Status
Not open for further replies.

GERPAT

Programmer
Aug 15, 2002
30
IE
insert into tablename(name,address)
values('fred','14 Evergree Terrace')

I was running the above query and kept getting the error "ORA-00928:missing select keyword" when inserting a row in a table, so I changed the insert statement to the following:

insert into tablename
values('fred','14 Evergreen Terrace')

It now works fine but I can't see why the original statement should break. Any ideas?
 
It worked for me (created a table with columns named NAME and ADDRESS, then executed your exact insert). I tried this using TOAD and SQL*PLUS - both worked.

You didn't specify what tool you were using to run the query. Perhaps either NAME or ADDRESS is a keyword to that tool and that messes it up????


Funny thing - that error message pertains to a CREATE VIEW statement - here is the snip from the error messages book:

ORA-00928 missing SELECT keyword

Cause: A SELECT subquery must be included in a CREATE VIEW statement.

Action: Correct the syntax. Insert the required SELECT clause after the CREATE VIEW clause and then retry the statement
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top