Path: news.easynews.com!core-easynews!newsfeed1.easynews.com!easynews.com!easynews!bigfeed2.bellsouth.net!news.bellsouth.net!elnk-atl-nf1!newsfeed.earthlink.net!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!Spring.edu.tw!news.nctu.edu.tw!feeder.seed.net.tw!attdv1!ip.att.net!newsfeed1.global.lmco.com!svlnews.lmms.lmco.com!not-for-mail
From: Michael Hill <hillmw@ram.lmtas.lmco.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Ampersand &
Date: Wed, 07 Jul 2004 10:05:26 -0500
Organization: Just an IT Kinda Guy
Lines: 33
Message-ID: <40EC1136.B062CA15@ram.lmtas.lmco.com>
References: <40EB15C0.F0A15C7A@ram.lmtas.lmco.com> <42fc55dc.0407061921.5cdd77b9@posting.google.com>
Reply-To: nospamhillmw@ram.lmtas.lmco.com
NNTP-Posting-Host: 134.189.107.83
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U)
X-Accept-Language: en,pdf
To: Romeo Olympia <rolympia@hotmail.com>
Xref: core-easynews comp.databases.oracle.misc:111559
X-Received-Date: Wed, 07 Jul 2004 14:09:11 MST (news.easynews.com)

Yes that is correct .... That works great ..thanks,

Mike

Romeo Olympia wrote:
> 
> 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@ram.lmtas.lmco.com> wrote in message news:<40EB15C0.F0A15C7A@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
