How to remove new line characters and Tab's in your SQL output
select comment from emp
Result (Comment column value is )
John M.
This was a
Fine piece of
work.
select REPLACE(REPLACE(REPLACE(comment, CHR(10)), CHR(13)), CHR(9)) comment from emp
Result (Comment column value is )
John M.This was a Fine piece of work.
This is very useful command.It help me out.Thanks
ReplyDeleteHi
ReplyDeleteThat is great for replacing. How would I search a column to find all the new line characters (made from a windows PC) first before replacing them?
Thanks
Its really works
ReplyDelete.
.
Tnx dude
Wonderful post :) it helped me fruitfully :) Tons of thanks
ReplyDeleteHi ...
ReplyDeleteI must say
Sairamgoud .This was a Fine piece of work.
:-)
Cheers
Naseer
Fantastic !
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThank you so much... it's really saved me a lot..
ReplyDeleteawesome job dude..!!!
also can use:
ReplyDeleteregexp_replace(comment, chr(9)||'|'||chr(10)||'|'||chr(13), '')
thanks! very helpful
ReplyDeletethanks!! it fixes my problem . . . .
ReplyDeleteCool.. it works in all my scenarios...
ReplyDeleteThanks dude...
Whoa!! it worked so well for my script where i was trying hard to get this.
ReplyDeleteWhoa!It really worked well in my case, i was trying hard to find something like this.
ReplyDeleteThank you... really helpful
ReplyDeleteHi Sairam,
ReplyDeleteA ton of thanks. God Bless you..!!
Regards,
RK
Appreciate the post. Sorted me out.
ReplyDeleteIt works great.
ReplyDelete