Unable to remove dos new line characters using convert
Moderators: chulett, rschirm, roy
Unable to remove dos new line characters using convert
As suggested by most of the people in the forum I used convert(char(13),' ',ipcol) to remove new line characters in a field while writing to a output sequential file.I was able to remove some of them but still there are few records where the field value is breaking the record line into two or three lines.I tried column terminators to yes,tr command and convert function but nothing is helping.Could anyone please suggest me on it as I am not sure if there are any other characters in the column value which is causing it to break.The source is lotus notes database table extracted from ODBC stage.I also used the combination of convert and column terminator.
Could you be getting DOS format of <CR><LF>? This would require a convert command of "CONVERT(Char(10):Char(13),'',ipcol)" for you.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ereplace() would be the more appropriate function, since Convert() only performs a character-by-character conversion. The Convert() solution would also eliminate isolated LF and CR characters, possible incorrectly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.