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: Help with syntax please...

RE: Help with syntax please...

From: Diana Duncan <dduncan_at_arsenaldigital.com>
Date: Tue, 13 Mar 2001 10:39:20 -0800
Message-ID: <F001.002CB3EF.20010313104728@fatcity.com>

You need

select replace(columnname, '%', '''')

quote, quote, quote, quote -- the two outside quotes are enclosing the string, and to "escape" a single quote within a string you use two of them.

HTH, Diana

-----Original Message-----
Sent: Tuesday, March 13, 2001 12:21 PM
To: Multiple recipients of list ORACLE-L

Please excuse any cross-post.


Pat Gorden-Ozgul               BNL-ISD Systems
gorden_at_bnl.gov                 631-344-5159





> -----Original Message-----
> From: Gorden-Ozgul, Patricia E
> Sent: Tuesday, March 13, 2001 12:06 PM
> To: 'ODTUG-SQLPlus'
> Subject: Help with syntax please...
>
> In order to force a data load, I converted apostrophes ['] to percentage
> [%] in certain varchar fields.
> I now need to update the table and convert them back.
>
> I'm having syntax difficulties. I'm testing the select before I do an
> update, of course.
> I'm sure one of you can help me.
>
> I've tried all the following with errors:
> select replace(columnname, '%', "'") - last argument is 'double-quote,
> quote, double-quote'
> ... produces ORA-00904: invalid column name on last argument
>
> select replace(columnname, '%', '''] [PGO] - last argument is 'quote
> quote quote'
> ...produces ORA-01756: quoted string not properly terminated
>
> select replace[columnname, '%', '"'"'] [PGO] - last argument is 'quote,
> double quote, quote, double quote, quote'
> ...produces ORA-01740: missing double quote in identifier
>
> Thank you.
>
> Pat
>
> __________________________________________________
> Pat Gorden-Ozgul BNL-ISD Systems
> gorden_at_bnl.gov 631-344-5159
>
>
>
>
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gorden-Ozgul, Patricia E
  INET: gorden_at_bnl.gov

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: Diana Duncan
  INET: dduncan_at_arsenaldigital.com

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 Tue Mar 13 2001 - 12:39:20 CST

Original text of this message

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