Page 1 of 1

Converting Multiple lines into single line

Posted: Wed Sep 09, 2009 8:41 am
by mydsworld
I have a column with longvarchar type that stores data in multiple lines. Please let me know how do I convert that into a single line.

Thanks.

Posted: Wed Sep 09, 2009 8:49 am
by DSguru2B
User CONVERT() function on that particular column inside the transformer to convert new line characters into spaces.

Posted: Wed Sep 09, 2009 8:51 am
by chulett
... and a newline would be represented by CHAR(10).

Posted: Wed Sep 09, 2009 1:43 pm
by nagarjuna
Also you acn use tr '\n' ' ' command

Posted: Wed Sep 09, 2009 2:11 pm
by Sainath.Srinivasan
Unfortunately tr command may not help the op like the convert as the conversion is required for only one field.