Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Replacing the pesky '

RE: Replacing the pesky '

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Mon, 22 Oct 2001 09:21:08 -0700
Message-ID: <F001.003B1695.20011022090526@fatcity.com>

David,

Try :

select replace('O'||''''||'brian','''','"') from dual;

REPLACE



O"brian

Remeber - four single quotes gets you one. The above replaces O'Brian with O"Brian.

In your example:

select replace(lastname,'''',' ') from adst where lastname like 'O%' (replacing a single quote with a space???) is probably what you want.

Hope this helps

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
[mailto:DBarbour_at_austin.isd.tenet.edu]
Sent: Monday, October 22, 2001 12:35 PM
To: Multiple recipients of list ORACLE-L

Gotta love Mondays,

We've been through this before, and I usually don't have a problem, but today my brain must think it's the weekend.

Hey, I've got a bunch of names like O'Brien and O'Reilley where I need to replace the ' symbol. I've tried every type of combination of single quotes and slashes(escape sequence) I can think of, but I must have missed one, because I can't get it to replace.

Any Ideas? Here's the progenitor of the whole mess.

1* select replace(lastname,' ' ') from adst where lastname like 'O%' SQL> /
ERROR:
ORA-01756: quoted string not properly terminated SQL> David A. Barbour
Oracle DBA, OCP
AISD
512-414-1002

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: DBarbour_at_austin.isd.tenet.edu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Oct 22 2001 - 11:21:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US