Is it possible to change the prompt char from & to something else

Bruce W

Member
This may be a silly question but is it possible to change the character used as the prompt &variable to something else? We have text with the ampersand imbedded 'C&S' and it's a pain in the you know what to have search based on something like this 'C' || chr(38) || 'S'. If it is possible to change it, where do you set this in the preferences?
Thanks,
Bruce
 
Last edited:
Marco is saying to change your SQL. Instead of 'C&S', type 'C&&S' in the SQL window. If you have 'SELECT 'C&&S' FROM dual; it will return 'C&S'.

If you put the line "set define off" (without the quotes) in your login.sql script in the directory that PL/SQL Developer is installed in, it won't ever prompt you. You need to "set define on" if you want to be prompted.

Another option is to use the test window for your SQL with ampersands. Seems crazy, but it works.

It be nice if there was an icon to push and toggle this.
 
Another workaround, change your code to:

Code:
select 'C' || chr(38) || 'S' /* C&S */ from [...]

Now your code works and you can still search on the term you want to search for.

Not what you were looking for, I know, but maybe it helps.
 
Well I guess I was hoping that like in Toad you could set the prefix for parameter marking to what ever value you wanted rather than have to do hokey coding to get the desired effect.
 
Back
Top