Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Question regardin replacing the value in a column
On 26.03.2004 05:34 Praveen wrote:
> 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 &
> < to <
> > to >
>
> for eg if the column had the value <pass & fail>
>
> when I execute the SQL
> select column from table; I should get <pass & fail>
>
> I do I write one single SQL to achieve this.
>
Have a look at the REPLACE function, that should do what you want (you have to
nest several calls to the function)
Thomas Received on Fri Mar 26 2004 - 01:06:51 CST