SQL Developer, SQL Server and the ampersand
573865Aug 14 2012 — edited Aug 14 2012Hello,
I am connected to a SQL Server database (2008) and am having difficulty getting a query to run properly in SQL Developer (3.1.07).
Simplified Example
select table_field
from table
where table_field <> 'This & That';
Expected results
table_field
Other stuff
Other stuff
Other stuff
Actual results
table_field
Other stuff
This & That
This & That
....
I cannot seem to get SQL Developer to recognize the & as a literal ampersand. I've tried escaping it numerous ways, but it always thinks it is a variable.
The query works exactly as expected in MS SQL Management Studio and Toad. Of course, I can just run it in one of those but I'd like to try to get this to work in SQL Developer. Suggestions?
Please let me know if I can provide further information. Thanks.