• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • Last Modified:

SQL update statement to replace txt string with a non-printable line-break character

SQL update statement to replace txt string with a non-printable line-break character
we would like to update all '<BR>' entries in a field with a non-printable line-break character

thank you.
0
rastafaray
Asked:
rastafaray
  • 2
1 Solution
 
ghayasurrehmanCommented:
update table set column = REPLACE(column,'<BR>','\r\n') where <your criteria>
0
 
rastafarayAuthor Commented:
that didnt work!  

we ended up with "HELLO\r\nTEXT" instead of "HELLO<BR>TEXT"

we are looking for

"HELLO
TEXT"
0
 
rastafarayAuthor Commented:
found it...

update table set column = REPLACE(column,'<BR>',CHAR(13) + CHAR(10)) where <your criteria>
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now