Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Compiling pl/sql in sqlplus with an @ char within the code?

Re: Compiling pl/sql in sqlplus with an @ char within the code?

From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Thu, 08 Jun 2006 14:09:35 +0200
Message-ID: <448814db$0$11078$9b4e6d93@newsread4.arcor-online.net>


Jeremy schrieb:
> I'm sure there's a simple answer to this one. The following code appears
> within a package body:
>
>
> htp.p('
> <style type="text/css" media="screen">
> @import "incl/css/layout.css";
> </style>
> ');
>
> When I compile the package body in sqlplus I get the folowing:
>
> 12:24:43 SQL> @ic_util.pkb
> SP2-0310: unable to open file "import.sql"
>
> Package body created.
>
> Elapsed: 00:00:00.01
> No errors.
> 12:24:45 SQL>
>
>
> Now I can see that sqlplus wants to run a .sql file called import.sql -
> is there a SET option to avoid this? I can see that joining th eline to
> the preceding one might avoid this problem but is there another way
> around it?
>

It seems, sqlplus gets broken on the first nonwhitespace "@" character ( regardless it is quoted).
In the PL SQL Developer this code compiles fine. I would suggest a workaround as

htp.p('

   <style type="text/css" media="screen">    '||chr(ascii('@'))||'import "incl/css/layout.css";    </style>
');

Best regards

Maxim Received on Thu Jun 08 2006 - 07:09:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US