Home » SQL & PL/SQL » SQL & PL/SQL » PL/SQL: ORA-00911: invalid character (Oracle 10g)
PL/SQL: ORA-00911: invalid character [message #639860] Sat, 18 July 2015 10:55 Go to next message
P1Oracle
Messages: 60
Registered: August 2014
Location: Hyderabad
Member
Hi ,below is the error for the package
-------- -----------------------------------------------------------------
9/5      PL/SQL: SQL Statement ignored
12/2     PL/SQL: ORA-00911: invalid character

 CREATE OR REPLACE PACKAGE BODY APPS.xbsi_printer_pkg
 AS
 PROCEDURE printer_select (errbuf OUT VARCHAR2
                         ,   retcode OUT VARCHAR2
                         ,   p_name  FND_CONCURRENT_PROGRAMS.PRINTER_NAME%Type
                         ,   C_name  fnd_concurrent_programs_tl.USER_CONCURRENT_PROGRAM_NAME%TYPe
     IS
 BEGIN    
     UPDATE fnd_concurrent_programs
     SET printer_name = p_name
     WHERE concurrent_program_id = (SELECT concurrent_program_id FROM fnd_concurrent_programs_tl

                                    where  USER_CONCURRENT_PROGRAM_NAME = C_name);--COMMIT; 
    END printer_select;
 END xbsi_printer_pkg;
 /
Re: PL/SQL: ORA-00911: invalid character [message #639861 is a reply to message #639860] Sat, 18 July 2015 11:13 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
too bad you did not use COPY & PASTE for the whole session.

FWIW - sqlplus does NOT correctly handle blank lines within a single SQL statement.

what results after you remove the line above "where USER_CONCURRENT_PROGRAM_NAME = C_name);--COMMIT;" line?
Re: PL/SQL: ORA-00911: invalid character [message #639862 is a reply to message #639860] Sat, 18 July 2015 13:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
SQL> l
  1  CREATE OR REPLACE PACKAGE BODY xbsi_printer_pkg
  2   AS
  3   PROCEDURE printer_select (errbuf OUT VARCHAR2
  4                           ,   retcode OUT VARCHAR2
  5                           ,   p_name  FND_CONCURRENT_PROGRAMS.PRINTER_NAME%Type
  6                           ,   C_name  fnd_concurrent_programs_tl.USER_CONCURRENT_PROGRAM_NAME%TYPe
  7       IS
  8   BEGIN
  9       UPDATE fnd_concurrent_programs
 10       SET printer_name = p_name
 11       WHERE concurrent_program_id = (SELECT concurrent_program_id FROM fnd_concurrent_programs_tl
 12
 13                                      where  USER_CONCURRENT_PROGRAM_NAME = C_name);--COMMIT;
 14      END printer_select;
 15*  END xbsi_printer_pkg;
SQL> /

Warning: Package Body created with compilation errors.

SQL> sho err
Errors for PACKAGE BODY XBSI_PRINTER_PKG:
LINE/COL ERROR
-------- -------------------------------------------------------------------------------------
7/6      PLS-00103: Encountered the symbol "IS" when expecting one of the following:
         := ) , default character
         The symbol ")" was substituted for "IS" to continue.

Note the last line.
Also note I have NOT the same error, so maybe we have not the same code and it will be hard to debug some code from another one.

[Updated on: Sat, 18 July 2015 13:17]

Report message to a moderator

Re: PL/SQL: ORA-00911: invalid character [message #641653 is a reply to message #639862] Wed, 19 August 2015 17:03 Go to previous messageGo to next message
ramsql
Messages: 4
Registered: August 2015
Location: chennai
Junior Member
PROCEDURE printer_select (errbuf OUT VARCHAR2
, retcode OUT VARCHAR2
, p_name FND_CONCURRENT_PROGRAMS.PRINTER_NAME%Type
, C_name fnd_concurrent_programs_tl.USER_CONCURRENT_PROGRAM_NAME%TYPe

i think u have to close the procedure proc_name()

Thanks
Ram
Re: PL/SQL: ORA-00911: invalid character [message #641665 is a reply to message #639861] Thu, 20 August 2015 02:54 Go to previous messageGo to next message
cookiemonster
Messages: 13975
Registered: September 2008
Location: Rainy Manchester
Senior Member
BlackSwan wrote on Sat, 18 July 2015 17:13

FWIW - sqlplus does NOT correctly handle blank lines within a single SQL statement.

Stand alone SQLs sure. If the SQL is within a PL/SQL block then sqlplus doesn't notice.
Re: PL/SQL: ORA-00911: invalid character [message #641667 is a reply to message #641665] Thu, 20 August 2015 03:06 Go to previous message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

And if you set SQLBLANKLINES to ON then it accepts them outside PL/SQL too.
SQL> set sqlblanklines on
SQL> select *
  2
  3  from dual
  4  /
D
-
X

1 row selected.

Previous Topic: Merge String
Next Topic: Creating String
Goto Forum:
  


Current Time: Sun Aug 02 11:52:48 CDT 2026