Can't INSERT INTO table [message #270572] |
Thu, 27 September 2007 10:07 |
simeet
Messages: 3 Registered: September 2007
|
Junior Member |
|
|
In PL/SQL DEveloper, when I run this simple INSERT statement
INSERT INTO rel_job_owner (dept, dept_sub, job_type_code, client_class_code)
VALUES('TOA', 'SIS', 'RetailTOAINACAT', NULL);
COMMIT;
I get an ORA-00911 error saying invalid charactar.
When I take out the ; and run this
INSERT INTO rel_job_owner (dept, dept_sub, job_type_code, client_class_code)
VALUES('TOA', 'SIS', 'RetailTOAINACAT', NULL)
COMMIT;
I get an ORA-00933 error saying SQL command not properly ended
If I run without the COMMIT statement, it runs okay but does not populate the table.
|
|
|
|
Re: Can't INSERT INTO table [message #270574 is a reply to message #270572] |
Thu, 27 September 2007 10:24 |
scorpio_biker
Messages: 154 Registered: November 2005 Location: Kent, England
|
Senior Member |
|
|
In PL/SQL Developer you do the insert statement without the ; and to commit you use the commit button (green arrow pointing downwards onto a disk).
The rollback button is next to it. These will both highlighted when you have data in your session to commit.
|
|
|
|
Re: Can't INSERT INTO table [message #270577 is a reply to message #270572] |
Thu, 27 September 2007 10:49 |
simeet
Messages: 3 Registered: September 2007
|
Junior Member |
|
|
Thanks for that.
Is there specific code to insert multiple rows for PL/SQL? Or do I have to do it one row at a time?
SQL> INSERT INTO rel_job_owner
2 (dept, dept_sub, job_type_code, client_class_code)
3 VALUES
4 ('TOA', 'SIS', 'RetailTOAINAnnuity', NULL)
5 ('TOA', 'SIS', 'RetailTOAINDRIP', NULL)
6 ('TOA', 'SIS', 'RetailTOAInNonACAT', NULL)
7 /
('TOA', 'SIS', 'RetailTOAINDRIP', NULL)
*
ERROR at line 5:
ORA-00933: SQL command not properly ended
|
|
|
|
|
|