Hi Friends
I want to know about STUFF function and how does it differ from the REPLACE function
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Sep 19, 2012, 11:46 PM
STUFF function to overwrite existing characters. Using this syntax, STUFF(string_expression, start, length, replacement_characters), string_expression is the string that will have characters substituted, start is the starting position, length is the number of characters in the string that are substituted, and replacement_characters are the new characters interjected into the string.
REPLACE function to replace existing characters of all occurance. Using this syntax REPLACE(string_expression, search_string, replacement_string), where every incidence of search_string found in the string_expression will be replaced with replacement_string.
Please refer the below link
http://blog.sqlauthority.com/2007/04/19/sql-server-interview-questions-part-5/
Thanks
VulpesPosted Sep 19, 2012, 9:45 AM
http://www.c-sharpcorner.com/Forums/Thread/183672/stuff-function-in-in-sql-server.aspx