5 Replies Latest reply on Feb 5, 2008 8:58 PM by 2889

    Getting a ORA-00911: invalid character, don't know why

    561112
      I am trying to run a script to set up the apache roller db for blogging. When running the whole script I kept getting this error. So I tried just running the first table creation and I still get the error. So I thought I'd type it out instead of importing the script and I still get the error. This is exactly what I typed out and I get the error:
      [Error] Script lines: 1-546 ------------------------
      ORA-00911: invalid character

      create table rolleruser (
      id varchar(48) not null primary key,
      username varchar(255) not null,
      passphrase varchar(255) not null,
      fullname varchar(255) not null,
      emailaddress varchar(255) not null,
      datecreated timestamp not null,
      locale varchar(20),
      timezone varchar(50),
      isenabled number(1) default 1 not null
      );

      Is there something wrong with that statement?
        • 1. Re: Getting a ORA-00911: invalid character, don't know why
          Nigel C.L. Thomas
          There's nothing wrong with the statement as you have it. I can create the table no problem.

          Are there unpleasant / unexpected / non-ASCII characters in the script on your side?

          Regards Nigel
          • 2. Re: Getting a ORA-00911: invalid character, don't know why
            618702
            SQL> create table rolleruser (
            2 id varchar(48) not null primary key,
            3 username varchar(255) not null,
            4 passphrase varchar(255) not null,
            5 fullname varchar(255) not null,
            6 emailaddress varchar(255) not null,
            7 datecreated timestamp not null,
            8 locale varchar(20),
            9 timezone varchar(50),
            10 isenabled number(1) default 1 not null
            11 );

            Table created.

            Check your script for escape chars. I guess you move it from linux to windows or etc.
            • 3. Re: Getting a ORA-00911: invalid character, don't know why
              546595
              table created with your script
              SQL> create table rolleruser (
                2  id varchar(48) not null primary key,
                3  username varchar(255) not null,
                4  passphrase varchar(255) not null,
                5  fullname varchar(255) not null,
                6  emailaddress varchar(255) not null,
                7  datecreated timestamp not null,
                8  locale varchar(20),
                9  timezone varchar(50),
              10  isenabled number(1) default 1 not null
              11  );

              Table created.
              i would go like this, primary key is not null by default so no need to mention it, also give name to constraint so it is easy to hadle. Also use varchar2
              SQL> ed
              Wrote file afiedt.buf

                1  create table rolleruser (
                2  id varchar(48) ,
                3  username varchar(255) not null,
                4  passphrase varchar(255) not null,
                5  fullname varchar(255) not null,
                6  emailaddress varchar(255) not null,
                7  datecreated timestamp not null,
                8  locale varchar(20),
                9  timezone varchar(50),
              10  isenabled number(1) default 1 not null,
              11  constraint pk_id primary key (id)
              12* )
              SQL> /

              Table created.
              formatted
              Message was edited by:
              devmiral
              • 4. Re: Getting a ORA-00911: invalid character, don't know why
                561112
                I found out that Aqua Data Studio doesn't like semicolons. I had to change them all to "Go" instead.
                • 5. Re: Getting a ORA-00911: invalid character, don't know why
                  2889
                  <<I found out that Aqua Data Studio doesn't like semicolons. I had to change them all to "Go" instead. >>

                  would have expected "SWIM" anyway