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: cjbj <cjbj_at_hotmail.com>
Date: 29 Jan 2004 17:26:17 -0800
Message-ID: <2ce8b846.0401291726.48b1cbe3@posting.google.com>


Andy Hassall <andy_at_andyh.co.uk> wrote in message news:<uoii105kpeugqftpbnhqc3egi6tov7dma8_at_4ax.com>...
> On Thu, 29 Jan 2004 08:12:26 -0800, Daniel Morgan <damorgan_at_x.washington.edu>
> wrote:
>
> >Impossible. You can kludge your way around it on a case by case basis
> >and probably get anything to work ... at least until Oracle releases a
> >patch that breaks the kludge. But the question I am asking is why, given
> >all of the characters on the keyboard, anyone would intentionally design
> >anything using a restricted keyword? Just change to something else and
> >the entire problem disappears.
> >
> [snip]
> >
> >I'm encouraging you to never use keywords for anything other than their
> >intended usage.
>
> But the OP posted an issue with an @ in a _literal string_, and a PL/SQL
> _comment_. So you're saying do not use any string present in V$RESERVED_WORDS
> in a literal string or a PL/SQL comment? That's rather limiting isn't it, given
> that useful things like spaces are in that view?
>
> It's clearly a bug in SQL*Plus (it has no right parsing anything other than
> substitution variables inside strings or comments, certainly not running them
> as an SQL*Plus command unless prefixed with the SQLPREFIX character); so how is
> it a fault on the part of the OP?
>
> e.g.
>
> SQL> set sqlprefix ~
> SQL> begin
> 2 /*
> 3 @none of sqlplus's business
> SP2-0310: unable to open file "none.sql"
> 3 start start.sql
> 4 ~start start.sql
> SP2-0310: unable to open file "start.sql"
> 4
>
> (Unless you can find a reference in the manual that says the @ command will be
> run even when in SQL or PL/SQL mode, regardless of the fact it doesn't make
> sense - in which I'll stand corrected, but baffled).
>
> Keywords shouldn't be used for identifiers, but this isn't about identifiers.

SQL*Plus has a very basic command parser. There are some other listed "features" at:

http://otn.oracle.com/support/tech/sql_plus/htdocs/runtime2.html#minus_sign

I expect the "@" issue has been a "feature" of SQL*Plus for the last 20 years.

Received on Thu Jan 29 2004 - 19:26:17 CST

Original text of this message

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