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: Question regardin replacing the value in a column

Re: Question regardin replacing the value in a column

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 26 Mar 2004 06:22:53 -0800
Message-ID: <2687bb95.0403260622.24f8b6e6@posting.google.com>


Praveen <nospam_at_spam.com> wrote in message news:<HpO8c.42878$GU2.38183_at_newssvr25.news.prodigy.com>...
> Hi..All,
>
> DB : Oracle 8i
>
> I have a column in a table which is of type varchar. It can contain
> characters like &, <, > etc along with all other characters.
>
> now, I want to replace them with some other characters when I select the
> column
>
> & to &amp;
> < to &lt;
> > to &gt;
>
> for eg if the column had the value <pass & fail>
>
> when I execute the SQL
> select column from table; I should get &lt;pass &amp; fail&gt;
>
> I do I write one single SQL to achieve this.
>
> Regards,
>
> P

Look in the SQL Manual at the function: REPLACE, which will replace one sub-string with another.

HTH -- Mark D Powell -- Received on Fri Mar 26 2004 - 08:22:53 CST

Original text of this message

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