Most of us have used the REPLACE function several times in our daily lives. This function, as you may remember, takes one string and replaces it with another, as seen below: Please don’t do this change in Production There is another function within SQL Server that many people think does the same thing, but with…… Continue reading Doing Something with the REPLACE function
Month: February 2022
Unicode Data and Keeping DBAs Happy
In our last session together, one of the many items we talked about was the fact that I asked that you use the DATALENGTH function instead of the LEN function because you could be using UNICODE data. The LEN function is used in SQL to find out – surprise, surprise – the length of a…… Continue reading Unicode Data and Keeping DBAs Happy
Padding Data In Multiple Ways
One of the many fun things we’re asked to do as a person who works with data is that we’re asked to do some manipulation of data – especially when we’re asked to pad data with 0’s to make a string longer that is numerical. For example, I’ve been asked many times to provide data…… Continue reading Padding Data In Multiple Ways
Checking Against Multiple Fields The Easy Way
A lot of times, you’re asked to find where two different tables have the same data. Thankfully, this is a fairly normal ask. Sometimes, though, you’re asked to see if they have the same data in 20 – 30 fields! I don’t know about y’all, but I definitely don’t want to have to type in…… Continue reading Checking Against Multiple Fields The Easy Way