Re: Non-printable sign
Posted in 2008
DeMi wrote: > Hello, > > I have problem with replacing non-printable 'new line' sign (^J) to > null. Actually, I don't know if Informix provides function like > Oracle's ord() or ascii() which would be helpful. > My task is to unload rows from sql query into file with default > delimiter '|'. It is very important that each record is written in one > separate line. However, it happens that one field can contain the 'new > line' sign. In this case my row is split into two lines which is not > allowed. The interested field is varchar type. > > Does anybody solved this kind of problem and how? > > Best regards > Michal Demyda Install the IDS regex bladelet (see Jean Anderson's article: http://www.ibm.com/developerworks/db2/zones/informix/library/techarticle/db_regexp.html) and the do something like: SELECT regex_replace(myvarchar,'\\n',' ') from mytable ... That's it!