Month: February 2018

DIFFERENCE BETWEEN TWO DATES BY DATEDIFF_BIG

DIFFERENCE BETWEEN TWO DATES BY DATEDIFF_BIG: DATEDIFF_BIG is a new function introduced in SQL Server 2016. We will also see what is the difference between the DATEDIFF and the new DATEDIFF_BIG function. The syntax for DATEDIFF and DATEDIFF_BIG are both similar however DATEDIFF will return a int value and the DATEDIFF_BIG will return a big

SQL Server String Split function available in SQL Server 2016

Starting from SQL server 2016 we have new String split function which will help to split a string in rows. With earlier version of sql server a developer would have to create his own custom scripts to achieve this task. Syntax : STRING_SPLIT( ‘string’,’separator’). Split string will divide the input string using a separator into

Translate function in Sql server 2017

With the new translate function in SQL server 2017 you can now replace the string for multiple characters at the same time. In earlier version of SQL server with replace function we have to use replace multiple times if we have to replace the string multiple times . Below is the syntax for Translate function

Trim function in sql server 2017

Before Sql server 2017 we only had LTRIM and RTRIM function available to remove spaces from left and right separately.  With trim function now being available in sql server 2017 it can be used for two purposes. Lets look at the syntax of Trim function  first. TRIM ( [ characters FROM ] string ) Trim