If you have a Table which has a Column of type char or varchar or even text, and you want to change a portion of text in it for example a path.
In this case you need to change the same text with new one in every records.
Here is the SQL Statement that do this:
In this case you need to change the same text with new one in every records.
Here is the SQL Statement that do this:
UPDATE [TableName] SET [ColumnName] = Replace([ColumnName],'OldText','NewText');
Source: https://www.nilebits.com/blog/2007/09/replace-text-in-a-column-in-sql-server/
Thanks ,it 's very good , but i want to ask how can i put a picture uploaded from my website in a certain column in my SQL in direct way(by the way i make the column binary datatype)
ReplyDeletethanks for u
A.B
Replace() doesn't work with text columns
ReplyDeleteThanks it worked a treat. I like your syntax names, clear!
ReplyDeleteHello everyone i am completely new to this forum.
ReplyDeleteInterested in learning many new things. Hope we all will share our
knowledge and talk about different concepts in this forum.
You are welcome, but this is not a forum it is a blog.
ReplyDeleteAnyway if you have something you want to share send it to me and I will post it and mention your name at the bottom of the article.
This is my email amr.saafan@hotmail.com
What do you mean?
ReplyDelete