Hi,
I am working with SQL plus on oracle database. When I try to insert a string that contains escape character like '&', it prompts for asking input for variable substitution as below:
Input query: "update table1 set column1 = 'AB&C'
Prompt: "Enter value for C:"
I try to add a slash before the '&' but it works the same.
Also, I try to blacket the '&' as '{&}' in the query and it gets success. But the field stores the '{}' at the same time. (e.g 'AB{&}C')
I would like to ask any good solutions to handle such escape characters when I input query in SQL plus ?
Thanks !
Ken
An alternative is to use escape-sharacters, which makes it possible to be prompted for some parts of the SQL.
Enable the use of escape-characters (default it is off)
SQL> set escape on
The escape character is backslash ("\"), but you can change it if needed, fx "set escape #".
Regards
Hans Henrik