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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Ampersand &

Re: Ampersand &

From: Romeo Olympia <rolympia_at_hotmail.com>
Date: 6 Jul 2004 20:21:54 -0700
Message-ID: <42fc55dc.0407061921.5cdd77b9@posting.google.com>


I am a little confused by what you want done.

Are you saying that you have values in a column that has ampersands '&' (eg. 'value1&', 'blah&')? And that you want to replace these with '&amp;' in the query output? You're using SQLPLUS aren't you?

If so, then you're having a bit of a mix-up with the default substitution variable &. You need to do this (in sqlplus):

SET ESC \ SELECT REPLACE(col1, '\&', '\&amp;')
FROM mytable;

Or I could have gotten your question all wrong in which case this post probably is just another scrambled egg.

Michael Hill <hillmw_at_ram.lmtas.lmco.com> wrote in message news:<40EB15C0.F0A15C7A_at_ram.lmtas.lmco.com>...
> I have a field that has an ampersand in it: "&" that I'd like to convert
> to "&amp;".
>
> I'd like to do the conversion right in the select query instead of after
> the query returns rows and I am looping through them.
>
> Any ideas are appreciated.
>
> Mike
Received on Tue Jul 06 2004 - 22:21:54 CDT

Original text of this message

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