Home » RDBMS Server » Server Administration » How to put a '&' in the SQL query?
How to put a '&' in the SQL query? [message #372071] Tue, 09 January 2001 02:02 Go to next message
dennis
Messages: 31
Registered: June 1998
Member
For example, I want my query to return:
Friends&Partners

When I do:
select 'Friends&Partners', it ask me to input value.
Re: How to put a '&' in the SQL query? [message #372078 is a reply to message #372071] Tue, 09 January 2001 07:23 Go to previous messageGo to next message
Todd Lesswing
Messages: 3
Registered: January 2001
Junior Member
Determine what your escape character is by running the command SHOW ESCAPE in sqlplus. If it says escape off. Type SET ESCAPE ON, this will set your escape character to \. You would then write your query as follows:

select 'Friends\&Partners' from dual;
Re: How to put a '&' in the SQL query? [message #372088 is a reply to message #372071] Tue, 09 January 2001 13:12 Go to previous message
Andrew again...
Messages: 270
Registered: July 2000
Senior Member
in sqlplus:
-- disable substitution variable scanning!
set scan off
Previous Topic: SQLPLUS format
Next Topic: indexs and performance
Goto Forum:
  


Current Time: Sat May 18 09:22:25 CDT 2024