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: Anthony <thtsang_yh_at_yahoo.com.hk>
Date: 29 Jan 2004 04:10:44 -0800
Message-ID: <4178bc57.0401290410.3cc96ba8@posting.google.com>


Thanks Daniel for the reply.

Do you mean that it is impossible to disable this behaviour?

As far as I know, the DB does not interpert the '@' specially in this case. It is SQLPlus which treat it as a special command. And surely Oracle will allow a reserved word in a string. (I would think that the '@' was considered reserved word because of its use in db link. But not sure...)

BTW, I don't think having a '@' in a the start position of a line in multi-line string indicates a bad design...

Actually, similar problem also arise for the following case:

(test.sql)
create or replace PACKAGE MyPackage IS
  PROCEDURE MyProcedure(MyParam1 IN VARCHAR2) ;

	/*
  	Do something.
		@param MyParam1 First Parameter
	*/

END MyPackage;
/

(In SQL*Plus)
SQL> @C:\test.txt
SP2-0310: unable to open file "param.sql"

Package created.

(I would agree that there may be an issue on programming style here.)

Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1075354681.632738_at_yasure>...

> SELECT keyword
> FROM v$reserved_words
> WHERE LENGTH(keyword) = 1;
>
> Don't try to kludge your way around a bad design ... fix your design.
Received on Thu Jan 29 2004 - 06:10:44 CST

Original text of this message

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