Click here to Skip to main content
11,928,352 members (48,250 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as



Oracle – Forward Slash Contd… (PL/SQL)

, 4 Nov 2013 CPOL
Rate this:
Please Sign up or sign in to vote.
Oracle SQL*Plus - Forward slash contd... (PL/SQL)


My friend was running an old PL/SQL script. The original developer seemed to have used another tool to run it, which was more pardoning with syntax than SQL*Plus. This exposed some new behaviors around (or lack of) forward slash.

The scripts were spooling into log files. For one of the scripts, he kept getting numbers!! Like:


It was puzzling, because we were not printing anything in the PL/SQL block except errors. After analyzing the code for a bit, we realized the script was missing the (REQUIRED) Forward slash after the PL/SQL block!!!

Here is a simple example:


i number;
select 1 into i from dual;

I just included <EOF> here to show that’s the end of file.

Run the above script on command line as:

sqlplus <login> @test.sql

Now, you will see number 9 printed. If you keep pressing enter now, number will start incrementing. Unless you know what’s going on here, you could just fill up the screen with numbers quickly, like so:


At this point, if you know the problem, you will just press a “/” and off it will go. Or you can do a CTRL-C to kill the script!!

The above behavior is because the script file was missing “/” at the end of PL/SQL block! So, next time you code your PL/SQL block, make sure to include that blessed “/” at the end of the block!

Filed under: CodeProject, Powerbuilder


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sam Varadarajan
Software Developer (Senior) City of Los Angeles
United States United States
Originally a Physics major, fell in love with Microprocessors and switched to Computer Science 20+ years ago. Since then, dabbled in various languages including, PowerBuilder, Oracle, Java, C, C++, Perl, Python etc. Constantly striving for quality and performance too.

I try to help fellow developers with technology as a way of "giving back to the community". Blogging became a natural extension of that effort. Still learning to perfect that art. If one new programmer out there benefits from this blog, my time and effort are fully worth it.

The underlying theme in my blogs is power and beauty of programming (and technology in general). A well written program gives me the sense of awe you get when you look at a man made wonder like Angkor Wat. You experience poetry, art, mystique, power all at once. A program and the troubleshooting that ensues also gives you a feeling you get while reading a mystery novel!

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.151126.1 | Last Updated 4 Nov 2013
Article Copyright 2013 by Sam Varadarajan
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid