ORA-00911: invalid character\n

Recently I got this error  “ORA-00911: invalid character\n”  When I was working with Oracle and Asp.net.I was just gone mad bcoz release coming closer and suddenly started getting this error.

I first thought it was due to “\r\n” character which getting created due to blank spaces.

Then I checked for singled out special character in query .. but no luck ….  😦

then as per Oracle – ORA-00911: 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 double quotes may contain any character other than a double quote. Alternative quotes (q”#…#”) cannot use spaces, tabs, or carriage returns as delimiters. For all other contexts, consult the SQL Language Reference Manual.   Action: none

But then I got One stupid mistake I have done forgot removing  ” ; ”  at end of the query

after removing ” ; ” at last problem got solved.   so be carefulll…..


25 thoughts on “ORA-00911: invalid character\n”

  1. hello , i have the same issue here i need to execute more than one insert command , when i put the ; between the tow command the stupided exception occure “ORA-00911: invalid character” , when i remove it ORA-00933: SQL command not properly ended 😦

    here is my commands

    command.CommandText = @”insert into SaafStudents(IDCardNumber,MEndDateH) values (‘1064714148′,TO_DATE(’10/06/2009’, ‘DD-MM-YYYY’));
    insert into SaafStudents(IDCardNumber,MEndDateH) values (‘1064714848′,TO_DATE(’10/06/2009’, ‘DD-MM-YYYY’))”;

    1. Thats bcoz you are sending two commands to oracle , there we need to have something to mark end of previous statement


    ORA-00911: invalid character\n
    Im need hepl

    1. Hi , Please chek your query ..
      Query is working for me.
      The main problem you are getting error is it seems you are copying the this query from somewhere else
      try to correct/type single quotation correctly .. instead of copying .


  3. Thanks! I hope my next project will be on Sql Server again.
    Oracle keeps pissing me off with its vague error messages without line numbers!!

  4. Woah! I’m really digging the template/theme of this
    site. It’s simple, yet effective. A lot of times it’s difficult
    to get that “perfect balance” between usesr friendliness and visual appeal.
    I must say that you’ve done a awesome job with this.

    Additionally, the blog loads super quick for me on Opera. Exceptional Blog!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s