0

I have a table with a text field info which contains text and urls. Something like `

Sometext <_a href="https://Asite.com/path">Link<_/a> sometext

I want to patch this text field and get

Sometext <_a href="https://Bsite.com/path">Link<_/a> sometext

I want to go through all these text fields and change all links inside the column info. Is there any SQL condition to implement this?

0

1 Answer 1

0

You can use the SQL Replace() function. Like this:

UPDATE TestTable
SET info = REPLACE(info, 'https://Asite.com/path', 'https://Bsite.com/path')
WHERE info like '%https://Asite%'

More information on the Replace keyword here - https://www.w3schools.com/sql/func_sqlserver_replace.asp

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.