Re: What Am I missing?

From: Powell, Mark <>
Date: Wed, 9 Sep 2020 15:16:55 +0000
Message-ID: <>

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

MPOWEL01_at_DUT> select 1 / 2 from dual
  2 /



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: <> on behalf of Dave <> Sent: Monday, September 7, 2020 3:57 PM
To: ORACLE-L <> 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

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
403 399 2442

Received on Wed Sep 09 2020 - 17:16:55 CEST

Original text of this message