T-SQL Regular Expressions: SUBSTRING, PATINDEX and CHARINDEX
In my previous article about T-SQL regular expressions, I have explained the LIKE operator, its...
Transact-SQL: Working With Strings
Microsoft SQL Server has many built-in functions that can be used to format the output and represents it in the desired format. In this...
Calculate the median by using Transact SQL
The statistical median is the value which separates a dataset into halves – one comprises greater values, and the other comprises...
Several Ways to Insert Split Delimited Strings in a Column
In this article, I will demonstrate several ways to split the delimited string and insert it in...
How to Properly Use the T-SQL IsNumeric Function
This article is focused on the T-SQL (Transact-SQL) IsNumeric function and its proper use in day-to-day SQL scripting tasks. We will also...
T-SQL Datetime Data Type
Introduction Data types are attributes that specify the kind of data that objects such as columns, local variables, expressions, and...
Concatenation in Transact-SQL
Introduction Assuming you maintain a table containing customer data, and your boss asks you to send...
Dealing with NULLs in SQL Server
What is NULL? NULL or the NULL marker is the way we represent an unknown value in SQL, by SQL I am referring to the standard Structured...
Using DATEADD, DATEDIFF and DATEPART T-SQL Functions in Simple Terms
This article focuses on developing a basic understanding of how to use one of the most common Transact-SQL date functions: DATEADD,...
Understanding GROUPING and GROUPING_ID Functions in SQL Server
The ROLLUP and CUBE operators are used to return results aggregated by the columns in the GROUP BY...