0

I tried to look for this online and read my code, but I wasn't able to find a solution.

I am using ORACLE Application Express 11G Edition.

Insert into Owner(O_ID, O_First, O_Last, O_Line, O_City, O_State, O_Zip, 
O_Phone, O_Email)

VALUES 

(1102, "Chris", "Leaves", "141-17 Union Turnpike Apt 3P","Flushing", "NY", 
"11367", "7182105108","chris2@gmail.com"),

(1433, "Steve", "Jobs", "88-12 Main Street","Flushing", "NY", "11367", 
"7189998476", "steve12@gmail.com"),

(2443, "Chris", "Melvin", "151-17 Jewel Avenue","Flushing", "NY", "11367", 
"7189971034","chris41@yahoo.com"),

(2425, "John", "Fellow", "131-14 Bell Blvd","Bayside", "NY", "11361", 
"7184413254","john32@yahoo.com"),

(2645, "Fish", "Mini", "171-14 169 Street", "Fresh Meadows", "NY", "11366", 
"7184435489","fish4ever@yahoo.com"),

(3514, "Aaron", "Hernadez", "51-14 Hollis Avenue","Hollis", "NY", "11423", 
"7185617865", "aaron81@gmail.com"),

(3621, "Gang", "Taylor", "230-11 Hillside Avenue","Queens Village", "NY", 
"11427", "7187764728", "Wiztaylor@gmail.com"),

(4214, "Brock", "Obama", "260-04 Hillside Avenue", "Bellerose", "NY", 
"11004", "7183432536", "brockobama@gmail.com"),  

(4314, "Astro", "Miller", "58-45 251st Street", "Little Neck", "NY", 
"11362", "7182156709", "astro214@yahoo.com"),

(4423, "Bin", "Bulu", "58-50 251st Street","Little Neck", "NY", "11362", 
"7185437832", "binbulu@gmail.com"),

(4928, "Alvin", "Chimp", "15 Garden Street", "Great Neck", "NY", "11021", 
"5168297189", "ChimpA21@gmail.com"),

(7841, "Allen", "Clover", "105 Station Road", "Great Neck", "NY", "11023", 
"5168298965", "allenC3242@yahoo.com"),

(4547, "Aiden", "Wyness", "28 Berkley Street", "Valley Stream", "NY", 
"11581", "5168258952", "aiden32421@gmail.com"),

(7849, "Derek", "Williams", "56 Hoffman Street", "Valley Stream", "NY", 
"11580", "5167918912", "DWill23@yahoo.com"),

(1892, "Antonio", "Burito", "3522 101st Street","Corona", "NY", "11368", 
"7182715567", "antonio212112@gamil.com"),

(5627, "Bob", "Iverson", "10912 34th Ave","Corona", "NY", "11368", 
"7185928911","Bobiverson23@gmail.com"),

(7829, "Phil", "Chang", "387 Andrews Rd","Mineola","NY","11501", 
"5168331106", "phillchang9@gmail.com"),

(8526, "Jacky", "Chu", "313 Columbus Pkwy", "Mineola", "NY", "11501", 
"5162487912", "jackychu54@gmail.com"),

(1720, "Kiba", "Wolf", "122 Beech St","Floral Park", "NY", "11001", 
"5163305792", "kibawolf4@gmail.com"),

(1920, "Kakashi", "Hatake", "40 Beechhurst Ave","Floral Park", "NY", "11001", 
"5168309910", "HatakeKaskashi@gmail.com");

This is just sample data, for example reasons. I encountered this error:

ORA-00933: SQL command not properly ended.

I don't know what is the reason for this, even though I am following the syntax

INSERT INTO table_name
VALUES (value1, value2, value3, ...);

Any help would be great thank you in advance!.

PM 77-1
  • 12,933
  • 21
  • 68
  • 111

1 Answers1

0
  • You need to include one INSERT INTO per each VALUES you're trying to insert
  • replace double quotes with single quotes when dealing with strings
  • every INSERT statement has to be terminated with a semi-colon

For example (I'm creating a dummy table as you didn't provide the CREATE TABLE statement):

SQL> create table owner
  2    (o_id    number,
  3     o_first varchar2(20),
  4     o_last  varchar2(20),
  5     o_line  varchar2(100),
  6     o_city  varchar2(50),
  7     o_state varchar2(10),
  8     o_zip   varchar2(10),
  9     o_phone varchar2(20),
 10     o_email varchar2(50));

Table created.

SQL>
SQL> insert into owner
  2    (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email)
  3  values
  4    (1102, 'Chris', 'Leaves', '141-17 Union Turnpike Apt 3P','Flushing', 'NY',
  5     '11367', '7182105108','chris2@gmail.com');

1 row created.

SQL>
SQL> insert into owner
  2    (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email)
  3  values
  4    (1433, 'Steve', 'Jobs', '88-12 Main Street','Flushing', 'NY', '11367',
  5     '7189998476', 'steve12@gmail.com');

1 row created.

SQL>

Or, you could use INSERT ALL:

SQL> insert all
  2    into owner
  3      (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email)
  4      values
  5      (1102, 'Chris', 'Leaves', '141-17 Union Turnpike Apt 3P','Flushing', 'NY',
  6       '11367', '7182105108','chris2@gmail.com')
  7    into owner
  8      (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email)
  9      values
 10      (1433, 'Steve', 'Jobs', '88-12 Main Street','Flushing', 'NY', '11367',
 11       '7189998476', 'steve12@gmail.com')
 12  select * from dual;

2 rows created.

SQL>

Or, UNION (ALL):

SQL> insert into owner
  2    (o_id, o_first, o_last, o_line, o_city, o_state, o_zip, o_phone, o_email)
  3  select
  4      1102, 'Chris', 'Leaves', '141-17 Union Turnpike Apt 3P','Flushing', 'NY',
  5      '11367', '7182105108','chris2@gmail.com'
  6    from dual
  7  union all
  8  select
  9    1433, 'Steve', 'Jobs', '88-12 Main Street','Flushing', 'NY', '11367',
 10    '7189998476', 'steve12@gmail.com'
 11  from dual;

2 rows created.

SQL>

Now you have 3 options, pick one.

Littlefoot
  • 131,892
  • 15
  • 35
  • 57