Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Compiling pl/sql in sqlplus with an @ char within the code?
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