Update Nth character in a column

How can we updated Nth character in a column in SQL . I want to update only 25th  character in my selected query .
SrivAsked:
Who is Participating?
 
ste5anConnect With a Mentor Senior DeveloperCommented:
You know, that this violates 1NF?

But you can play with this:

UPDATE yourTable
SET yourColumn = SUBSTRING(yourColumn, 1, 24) + '#' + SUBSTRING(yourColumn, 26, 1024)
WHERE LEN(yourColumn)>26;

Open in new window


Make backups first..
0
 
SrivAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.