Page 1 of 1

Unable to remove dos new line characters using convert

Posted: Fri Oct 01, 2010 9:57 am
by RK72
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.

Posted: Fri Oct 01, 2010 11:52 am
by nani0907
1)check weather the column metdata is correct in the seqfle

2) give dos format for "record delimiter string" inseq file options

try this once

Posted: Sun Oct 03, 2010 5:28 am
by ArndW
Could you be getting DOS format of <CR><LF>? This would require a convert command of "CONVERT(Char(10):Char(13),'',ipcol)" for you.

Posted: Sun Oct 03, 2010 12:19 pm
by ray.wurlod
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.

Posted: Mon Oct 04, 2010 8:47 am
by RK72
It was the char(10) problem.I resolved it.Thanks for all the help.