TOC

  1. AT TIME ZONE - MS SQL AT TIME ZONE was introduced in MS SQL version 2016 and the main purpose is to convert an inputdate to the corresponding datetimeoffset value in the target time zone.
  2. COMPRESS AND DECOMPRESS - MS SQL COMPRESS and DECOMPRESS are introduced into MS SQL version 2016. In this post we will read the overview of both functions, limitations and benefits. We will also test the performance compared to ROW and PAGE compression methods.
  3. CONCAT vs CONCAT_WS - SQL Server function CONCAT is introduced in MS SQL version 2012. Simple as that it returns a string that is the result of concatenating two or more string values. Let’s compare it with the new function CONCAT_WS which is introduced in MS SQL Server 2017.
  4. CREATE OR ALTER - CREATE OR ALTER is a new MS SQL Server syntax extension introduced from MS SQL Server 2016. Read more about it in this post.
  5. DATEDIFF_BIG - In short, introduced in MS SQL 2016, DATEDIFF_BIG is almost the same function as DATEDIFF starting from MS SQL 2008 that is commonly used already. So, let’s see how and for what is used and what are the benefits.
  6. DROP IF EXISTS (a.k.a. DIE) - DROP IF EXISTS is a new MS SQL Server syntax extension introduced from MS SQL Server 2016. Read more about it in this post.
  7. Format MS SQL data in JSON format - Prior to MS SQL server 2016 manipulating data in JSON format was not supported and sometimes a challenging task, forcing us to implement third party solutions (e.g. CLR). In this article we will see how we can create JSON objects from MS SQL data.
  8. FORMATMESSAGE - Read more about MS SQL FORMATMESSAGE function introduced in MS SQL 2016. Find samples and explanations. Let's find how to use it and what has in common with the C# String.Format() method.
  9. HASHBYTES - Hashing in MS SQL Server - In short words, hashing is a process of generating a value or values from a string of text using a mathematical function. Let's see the usage of the MS SQL function HASHBYTES witch purpose is to hash values. MS SQL function HASHBYTES was introduced in MS SQL version 2005 supporting MD2, MD4, MD5, SHA, SHA1 hashing algorithms. From MS SQL server version 2012 additionally the SHA2_256, SHA2_512 algorithms were introduced. In this article we will discuss about hashing, what's new from SQL 2016 and see some usage examples.
  10. Historical data with MS SQL System-Versioned (Temporal) Tables - Before the existence of system-versioned temporal tables, tracking changes in a database table forced us to implement some custom solutions based on triggers, stored procedures etc. System-versioned temporal tables offer us the possibility to keep a full history of data changes and allowing us easy point in time analysis. Using this solution, we can easily time travel through the data and see what the exact state of the data in a point of time was.
  11. JSON functions, tips & tricks - After discussing about how MS SQL Server can help us to format MS SQL data in JSON format and how to read JSON data in MS SQL Server, in this article we will quickly pass over some additional functions, tips and tricks and possibilities handling JSON data in MS SQL Server.
  12. Modify JSON data using JSON_MODIFY - After discussing about how MS SQL Server can help us to format MS SQL data in JSON format and how to read JSON data in MS SQL Server, in this article we will see how we can modify JSON data in MS SQL Server using JSON_MODIFY function.
  13. Read JSON data in MS SQL - Starting from MS SQL server 2016 you can convert JSON data to tabular format. It is possible using the newly introduced OPENJSON rowset function. Let’s find how!
  14. STRING_AGG - In this post we will learn something about MS SQL STRING_AGG function introduced in MS SQL version 2017 for string aggregation, how we did it before and test its performance compared to the old way.
  15. STRING_ESCAPE - MS SQL STRING_ESCAPE introduced in MS SQL 2016 escapes special characters in texts and returns text with escaped characters.
  16. STRING_SPLIT - Let's talk about MS SQL STRING_SPLIT table-valued function introduced in MS SQL version 2016 for splitting string values by a separator. How we did it before and test its performance compared to the old way. We will also see the pros but also cons of the function.
  17. TRANSLATE - Read more about MS SQL TRANSLATE function introduced in MS SQL 2017. Find samples and explanations.
  18. TRIM - TRIM is a new MS SQL Server function introduced from MS SQL Server 2017. It removes space characters from both sides (at the beginning/left and at the end/right) of the given string value. You can read more in this post.