- Stuff function inserts a string into a string at a specified position. It feels a bit like REPLACE (and you can certainly use it that way), but it's really designed to do something different - push x characters into a string based on an index and length.
- Andy was surprised to realize it was the only string function he had never used to solve a problem.
- If you try to use the stuff function to insert a null at a certain position of the string to replace a few characters, it does not error but it just returns the remaining characters after removing the number of characters you have specified.
- If you try to use the stuff function that has null in its string, no matter what you try to replace it with it returns null
Friday, November 05, 2010
The hardly used stuff function
My share of todays learning at sql share is the unusual stuff function. I have not heard of this function before and here are my learnings from the video by Andy Warren.
It has been quite a while since I have posted about the free databases and data visualisation classes for 9 to 14 year old kids. So here I...
Today I was trying Node.js to connect to SQL Server, the connection to the sql server failed with the below error. name: 'ConnectionE...
In this post I would like to share my experience of migrating our Reporting server from sql server We installed SQL SERVER 2017 on...
This morning I was trying to call a stored procedure and insert the results in a temp table using the following code -- create table #...