Reputation: 323
I am attempting to populate a table with some data and for some reason Oracle wont accept a standard INSERT VALUES statement. This is a technique I have used innumerable times over the years and quite frankly I am stumped. Probably missing something completely obvious but anyway, here is the culprit:
Error starting at line : 3 in command:
INSERT
INTO P_TBL_CHECK
( 1
, PRIMSUB
, PRIMSUBENID
, SECSUB
, SECSUBENID
, REGION
, INN
, CCT
)
VALUES
( 1
, '10/6116/004/E-BARMOUTH'
, '10287699'
, 'GSS-SH6016/004 BRANKSOME NO1'
, '10246206'
, 'MW'
, '001'
, '01'
);
Error at Command Line : 3 Column : 30
Error report -
SQL Error: ORA-00928: missing SELECT keyword
00928. 00000 - "missing SELECT keyword"
*Cause:
*Action:
Upvotes: 0
Views: 198
Reputation: 3270
There is a number 1
in your first parameter from your INTO clause.
It should be the name of the column.
If it is a column auto generated you it can be skipped.
As states the documentation: A list of columns in a database table or view. The columns can be listed in any order, as long as the expressions in the VALUES clause are listed in the same order. Each column name can only be listed once. If the list does not include all the columns in a table, each missing columns is set to NULL or to a default value specified in the CREATE TABLE statement.
Upvotes: 1