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: How to disable '@' in SQL*Plus?

Re: How to disable '@' in SQL*Plus?

From: Turkbear <john.g_at_dot.spamfree.com>
Date: Fri, 30 Jan 2004 14:42:59 -0600
Message-ID: <m8gl10pt3g0jpo7os6379g4vh7eq3rhjhv@4ax.com>


"Merci" <msmith_at_whi.org> wrote:

>Can you replace the offending @ ?
>
> select chr(64)||'a' from dual;
>
>
>"Anthony" <thtsang_yh_at_yahoo.com.hk> wrote in message
>news:4178bc57.0401282108.3d6c076f_at_posting.google.com...
>> I would like to execute a SQL script similar to following in sqlplus:
>>
>> (test.sql)
>> select '
>> @a
>> '
>> from dual;
>>
>> SQL*plus attempted to execute a script called a.sql and this fails:
>>
>> SQL> @test.sql
>> SP2-0310: unable to open file "a.sql"
>>
>> ''
>> --------------------------------
>>
>>
>> Is there any method to disable SQL*plus from interpreting the @
>> chacter as the start command and execute a script?
>>
>> (The expected output of the sql is as follows. Seems 'ed'iting SQL can
>> disable the @:
>>
>> SQL> ed
>> Wrote file afiedt.buf
>>
>> 1 select '
>> 2 @a
>> 3 '
>> 4* from dual
>> SQL> /
>>
>>
>> @a
>> ----------------------------------------------------------------
>>
>> @a
>>
>>
>> )
>>
>> Thanks very much in advance
>

Your original test.sql works fine for me ( I renamed it test1.sql since I already had a test.sql)

test1.sql:
select '@a' from dual;

Output::
SQL> @test1.sql

'@

--
@a

SQL> 

--------------------------------------------------------------------------------------------------------------------------------------------------
Received on Fri Jan 30 2004 - 14:42:59 CST

Original text of this message

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