Home » SQL & PL/SQL » SQL & PL/SQL » SQL Error: ORA-00911: invalid character - HELP! (SQL Designer 3.1.07)
icon4.gif  SQL Error: ORA-00911: invalid character - HELP! [message #570903] Sat, 17 November 2012 20:35 Go to next message
samun_9911
Messages: 2
Registered: November 2012
Junior Member
Help!

I am receiving the SQL Error when trying to do a simple insert statement..

Below is the supposed errant SQL..WHERE???..can someone please offer some guidance? Thanks in advance!

SQL
insert into (CUSTOM_TBL)
Select
'123456' --CHARTFIELD2
,'PR' --EXAMPLE COMMENT
,'123456_01' --EXAMPLE COMMENT - SUPPOSED ERROR FIELD SEE ERROR STATMENT BELOW:

Error at Command Line:5 Column:10
Error report:
SQL Error: ORA-00911: invalid character
00911. 00000 - "invalid character"
*Cause: identifiers may not start with any ASCII character other than
letters and numbers. $#_ are also allowed after the first
character. Identifiers enclosed by doublequotes may contain
any character other than a doublequote. Alternative quotes
(q'#...#') cannot use spaces, tabs, or carriage returns as
delimiters. For all other contexts, consult the SQL Language
Reference Manual.
*Action:
Re: SQL Error: ORA-00911: invalid character - HELP! [message #570904 is a reply to message #570903] Sat, 17 November 2012 20:41 Go to previous messageGo to next message
BlackSwan
Messages: 22928
Registered: January 2009
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/

>insert into (CUSTOM_TBL)
if CUSTOM_TBL is actual table name, then remove the parenthesis ["()"] as below
insert into CUSTOM_TBL
Re: SQL Error: ORA-00911: invalid character - HELP! [message #570905 is a reply to message #570904] Sat, 17 November 2012 20:56 Go to previous messageGo to next message
samun_9911
Messages: 2
Registered: November 2012
Junior Member
@BlackSwan: Thanks for the guidelines on posting. I will be better prepared on posting next time. Also, the parenthetical CUSTOM TABLE was errant and should have been insert into CUSTOM_TBL (which is an arbitrary name). However, that is not where the error is being generated from. The 5th line column 10 is the issue:

,'123456_01' --EXAMPLE COMMENT

I have written many insert statements in the past and have no idea of what the invalid character is within the statement...

Thanks in advance for any assistance!!
Re: SQL Error: ORA-00911: invalid character - HELP! [message #570906 is a reply to message #570905] Sat, 17 November 2012 21:07 Go to previous messageGo to next message
BlackSwan
Messages: 22928
Registered: January 2009
Senior Member
I would remove the comments.
posted code seems to be missing FROM clause.
Re: SQL Error: ORA-00911: invalid character - HELP! [message #570911 is a reply to message #570903] Sun, 18 November 2012 01:03 Go to previous message
Michel Cadot
Messages: 59510
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
insert into CUSTOM_TBL
Select
'123456' --CHARTFIELD2
,'PR' --EXAMPLE COMMENT
,'123456_01' --EXAMPLE COMMENT 
FROM DUAL;

or
insert into CUSTOM_TBL 
VALUES (
'123456' --CHARTFIELD2
,'PR' --EXAMPLE COMMENT
,'123456_01' --EXAMPLE COMMENT 
);

ALL statements are dsscribed in details with examples in Database SQL Reference.

Regards
Michel

Previous Topic: Query help
Next Topic: Range
Goto Forum:
  


Current Time: Sat Nov 01 07:03:20 CDT 2014

Total time taken to generate the page: 0.14755 seconds