Handling Ampersand on Oracle SQL.
Thursday, December 10, 2015
Tags: Ampersand, Oracle, SQL
While working on Oracle SQL statements, if you have text fields containing ampersand / and (&) symbol, you will probably get a pop-up for input screen asking for variables. It is because ampersand works as a variable on the query. What you need to do is:
set define off;
so that ampersand will be considered as a regular symbol in the expersion:
SELECT name FROM table WHERE company = 'Barnes & Noble';
So if you want to work on ampersand as a regular text then adjust define to off.