RE: How to suppress special characters in query

  • From: <Joel.Patterson@xxxxxxxxxxx>
  • To: <Jacques.Kilchoer@xxxxxxxxx>, <Harvinder.Singh@xxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 5 Feb 2007 16:58:48 -0500

You can do 'show all', and you can set the character to anything else, but best 
is set define off.

Also, this is a sqlplus defined character, not a SQL or PL/SQL characteristic.  
 In other words you could use another program, like java, .net etc which would 
not be affected.   Even PL/SQL Developer, SQL*Navigator etc. would work.

Joel Patterson
Database Administrator
joel.patterson@xxxxxxxxxxx
x72546
904  727-2546

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Jacques Kilchoer
Sent: Monday, February 05, 2007 4:23 PM
To: Harvinder.Singh@xxxxxxxxxxxxx; oracle-l
Subject: RE: How to suppress special characters in query

You say "without using set define off". Why can't you use set define off? You 
could include set define off in the SQL*Plus login.sql or glogin.sql file.

Otherwise, try this:
select * from tab1 where col1 = 'A ' || chr (38) || ' B' ;
assuming the database has the ASCII character set - if you had a database with 
an EBCDIC character set I don't think this would work - or would it? 

-----Message d'origine-----
De : oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] De la 
part de Harvinder Singh
Envoyé : lundi, 5. février 2007 13:03
À : oracle-l
Objet : How to suppress special characters in query

Hi,

We have a query like following that includes the & symbol and since this
is a special character so Oracle prompts for the input. Is there any way
to suppress this special character in a query without using the set
define off option at sqlplus session?

Select * from tab1 where col1 like = 'A & B'

Thanks
--Harvinder

--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


Other related posts: