Re: Replace a carriage return in a text field
Posted in 2007
HI, Jared,
Have you tried magic?
EXECUTE PROCEDURE IFX_ALLOW_NEWLINE('t');
update mytab set desc=replace(desc,'
',"#")
where mycol =90010564;
Yes, jusr hit Enter key, instead of using special cracter for NewLine.
Cheers!
Frank
On 5/11/07, floyd@fwellers.com <floyd@fwellers.com> wrote:
>
> I usually unload the primary key and the field in question to a file on
> unix, and use the 'tr' command to get rid of any control characters, then
> load it back up with a sql statement.
>
>
>
> <DIV><FONT face=Verdana size=2> </FONT></DIV>
> <br>
> ======================== <br>
> email: floyd@fwellers.com <br>
> Home: 703-430-0805 <br>
> Cell: 703-477-6045 <br>
> ======================== <br>
> <br>
> www.one.org <br>
> <br>
> <br>
> <br>
>
>
> >-----Original Message-----
> >From: jared.hanks@gmail.com [mailto:jared.hanks@gmail.com]
> >Sent: Thursday, May 10, 2007 09:05 PM
> >To: informix-list@iiug.org
> >Subject: Replace a carriage return in a text field
> >
> >Hello,
> >
> >I need to remove carriage returns in a text field. Does anyone know
> >how to do this? I've tried the following:
> >
> >update item_table
> >Set long_description = replace(long_description,"~r"," ")
> >where inv_id = "130539";
> >
> >and I get the following error: "674: Routine (replace) can not be
> >resolved."
> >
> >I've also tried:
> >
> >Update items_table
> >Set long_description = replace(replace(long_description,
> >char(10),char(13)),char(13),' ')
> >where inv_id = "130539";
> >
> >and I get the following error: "674: Routine (char) can not be
> >resolved."
> >
> >I tried looking at the manual but couldn't figure it out.
> >
> >Any help is appreciated.
> >
> >Thanks,
> >Jared
> >
> >_______________________________________________
> >Informix-list mailing list
> >Informix-list@iiug.org
> >http://www.iiug.org/mailman/listinfo/informix-list
> >
>
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
>