Re: What Am I missing?

From: Powell, Mark <mark.powell2_at_dxc.com>
Date: Wed, 9 Sep 2020 15:16:55 +0000
Message-ID: <DM6PR01MB592989747933AB3F0F80A8EDCE260_at_DM6PR01MB5929.prod.exchangelabs.com>



I will point out the meaning of a slash in SQLPlus is postitional.

MPOWEL01_at_DUT> select 1 / 2 from dual
  2 /

       1/2


        .5

MPOWEL01_at_DUT> select 3 / 4 from dual
  2 / --

In the first statement the slash was in the third position but alone on the line, it executed correctly. In the second a line comment was added and the code does not execute. Tested with same results on 11.2 and 12.2. A slash within a SQL expression should be passed to the SQL engine and not handled by SQLPlus itself.

If you are trying to parse the code prior to submitting it via SQLPlus then perhaps replacing slash intended to execute the SQLPlus buffer contents can be replaced with a semicolon?

Mark Powell
Database Administration
(313) 592-5148



From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Dave <oracle_at_1001111.com> Sent: Monday, September 7, 2020 3:57 PM
To: ORACLE-L <oracle-l_at_freelists.org> Subject: Re: What Am I missing?

Thanks to all who replied. I'm sure I hit this before at some point, but middle age set in long ago.

We were doing automated deployments to test using sqlplus and I had edited the file for readability.

Sure glad I didn't reject it as untested. Wish I could reject it for being stupid code.

Thanks once again
Dave

On 2020-09-07 1:54 p.m., Mladen Gogala wrote:

> On 9/7/20 3:47 PM, Mladen Gogala wrote:

>> Hi Dave,
>> It's a PL/SQL parser bug. Boh SQL*Developer and SQL*Plus report an error on thee "/" line, Here is the version that works:
> On 2020-09-07 1:23 p.m., Sayan Malakshinov wrote:

>> Hi Dave,
>>
>> This problem is not in oracle, but in a client tools, usually in sqlplus (I'm not sure about SQLcl) where / means 'execute' command:
>>
--
Dave Morgan
Senior Consultant, 1001111 Alberta Limited
dave.morgan_at_1001111.com
403 399 2442
--
https://clicktime.symantec.com/34gjyQ4r2uLu24bGvBLmgQw7Vc?u=http%3A%2F%2Fwww.freelists.org%2Fwebpage%2Foracle-l





--
http://www.freelists.org/webpage/oracle-l
Received on Wed Sep 09 2020 - 17:16:55 CEST

Original text of this message