Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Whats wrong with this simple Insert?

Author  Topic 

candelario
Starting Member

2 Posts

Posted - 2012-08-31 : 22:02:53
I can't figure out what I'm doing wrong I keep getting the following message: ORA-00911: invalid character

I am using Oracle 10g express edition.

The create table works. The insert statements work when I do them separately at a time. Any suggestions?

CREATE TABLE COURSE (
CRS_CODE varchar2(10),
DEPT_CODE varchar2(10),
CRS_DESCRIPTION varchar2(35),
CRS_CREDIT number(8)
);

INSERT INTO COURSE VALUES('ACCT-211','ACCT','Accounting I','3');

INSERT INTO COURSE VALUES('ACCT-212','ACCT','Accounting II','3');

INSERT INTO COURSE VALUES('CIS-220','CIS','Intro. to Microcomputing','3');

INSERT INTO COURSE VALUES('CIS-420','CIS','Database Design and Implementation','4');

INSERT INTO COURSE VALUES('QM-261','CIS','Intro. to Statistics','3');

INSERT INTO COURSE VALUES('QM-362','CIS','Statistical Applications','4');

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-08-31 : 22:11:40
SQLTeam.com is on MS SQL Server. For Oracle question, try dbforums.com

try removing the single quote around the last value. It suppose to be number not string. For SQL Server, it is fine, as it will convert it to number automatically. Not sure how Oracle will behave.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2012-09-01 : 10:01:24
Have you tried running it as a sql script?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

candelario
Starting Member

2 Posts

Posted - 2012-09-02 : 23:11:56
I figured out what was wrong. I was running Express Edition in Google Chrome. Apparently it only works in IE. Thanks for the suggestions.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2012-09-03 : 01:35:19
thanks for the update.

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -