Substitution string and SQL Developer

Written by Paulo Vale on Friday, September 21, 2007

I use a substitution string in my applications to set the system path to my images. I call it MYFILES. Sometimes I create procedures and functions referring this substitution string to generate HTML code like this example:

IMG SRC="&MYFILES.image.gif"

Today I was trying to create a procedure in SQL Developer (another Oracle great tool) using that substitution string, but I got a problem with & character because its presence was interpreted as a substitution variable. I've noticed that SQL Developer even when the '&' is in a comment it is being interpreted as a substitution variable.
The solution to bypass this problem was using this simple command at the top of the code:


Here you can see that this command is considered obsolete and it was substituted by the SET DEFINE command. Worked for me.

Related Posts by Categories

Widget by Hoctro | Jack Book
  1. 7 comments: Responses to “ Substitution string and SQL Developer ”

  2. By Unknown on February 18, 2009 at 8:57 AM

    Thanks a lot, "set scan off" really did the trick.

  3. By Anonymous on April 6, 2009 at 9:53 AM


  4. By Anonymous on June 16, 2009 at 9:37 PM

    Had been scanning the Tools Preferences and was about to give up when I looked this up - Never would of guessed this - Thanks

  5. By Anonymous on October 20, 2009 at 3:24 AM

    It really help me, thank bro

  6. By Anonymous on February 16, 2011 at 2:24 PM

    Thanks man. That was driving me nuts.

  7. By Barry McGillin on July 4, 2011 at 11:41 AM

    This is standard SQL*Plus functionality and we are adding more and more on each release!

  8. By Quinn on August 30, 2013 at 2:02 PM

    This is awesome!