replacing [enter] key
Posted in 2005
Topics: SQL Development & Query Writing, Data Types & Schema Design
Hi, I have a table with a varchar attribute, that holds the inputs froma an HTML's textarea input control. The thing is that this varchar attribute may have new line chars. But my problem is that I need to make an sql query that remove the "newline" characters and replace them by spaces. I tested it with the REPLACE function but I don't know how to express the newline character (ascii 13). I'm using Informix 9.21.HC4 Thanks in advance, Gabriel
gaby@ieee.org wrote: > > I have a table with a varchar attribute, that holds the inputs froma an > HTML's textarea input control. > > The thing is that this varchar attribute may have new line chars. But > my problem is that I need to make an sql query that remove the > "newline" characters and replace them by spaces. > > I tested it with the REPLACE function but I don't know how to express > the newline character (ascii 13). > > I'm using Informix 9.21.HC4 Google for a post by Doug Lawry at comp.databases.informix back on 22 April 2005. The subject line starts with "How to query up the newline". In that post, Doug shows an UPDATE statement with REPLACE to remove a newline. I haven't tested it myself, but would be confident that it works as advertised. -- June Hunt