0

I am very new at SQL and keep getting erors when I try to change some text in my dataqbase for every instance. I was told my syntax was incorrect:

I am tryingto change the text in the lst link to the second link.

UPDATE dbo.qanda

SELECT Replace(‘http://vhahacnonva.vha.med.va.gov/’, ‘http://nonvacare.hac.med.va.gov/

1

1 Answer 1

2

You are using a wrong REPLACE syntax. Also check your backtick, they should be quotes instead. Try this syntax

UPDATE dbo.qanda
SET columnname = REPLACE(columnname, 'http://vhahacnonva.vha.med.va.gov/', 'http://nonvacare.hac.med.va.gov/');

Just change columnname with your actual column name.

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

1 Comment

Right on the money, Fabio.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.