SQL Server

/SQL Server

Split string in SQL

Split is used to break a delimited string into multiple rows. The below user defined function udf_Split accepts 2 parameters Input the string that you want to split into multiple rows. Delimiter the delimiter based on which the seperation will be performed.

2017-03-06T11:32:57+00:00 January 10th, 2017|SQL, SQL Server|0 Comments

Remove time from datetime in SQL

There are two ways to remove the time from the datetime datatype. The first method is using the dateadd and datediff system functions and the second method is to convert from datetime to characters. --First Method SELECT DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0) --Second Method SELECT CONVERT(CHAR(11), GETDATE(), 113) The second method converting the [...]

2017-03-05T13:54:56+00:00 January 10th, 2017|SQL, SQL Server|0 Comments