1

I need to change all the 'PostalCode' column strings by setting a character 'A' at the beginning of the string. I've tried this:

UPDATE Customers SET PostalCode = STUFF(PostalCode , 0 , 1 , 'A')

But nothing... Any ideas?

3
  • SET PostalCode = CONCAT('A', PostalCode ). Commented Jul 28, 2016 at 12:01
  • Learn to tag your questions correctly. Commented Jul 28, 2016 at 12:13
  • Sorry, will watch out next time. Commented Jul 28, 2016 at 12:14

2 Answers 2

6

You can try to use CONCAT

UPDATE Customers
SET PostalCode = CONCAT('A', PostalCode )
Sign up to request clarification or add additional context in comments.

1 Comment

Why not A + PostalCode?
1

You can try this, I hope this is useful for you.

UPDATE Customers
SET PostalCode = 'A' + PostalCode

Comments

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.