Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2010-09-10
3
504 Views
Last Modified: 2012-05-10
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
Comment
Question by:rastafaray
  • 2
3 Comments
 
LVL 3

Expert Comment

by:ghayasurrehman
ID: 33649321
update table set column = REPLACE(column,'<BR>','\r\n') where <your criteria>
0
 

Author Comment

by:rastafaray
ID: 33650366
that didnt work!  

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

we are looking for

"HELLO
TEXT"
0
 

Accepted Solution

by:
rastafaray earned 0 total points
ID: 33650409
found it...

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

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question