REPLACE Function in SQL Server

REPLACE Function in SQL Server with Literal String

In this SQL Server tutorial, you will learn how to use the REPLACE function in SQL Server. Where you will understand the workings of the REPLACE() function, and how to use it with a literal string, collation, and table columns. REPLACE Function in SQL Server The REPLACE() function in SQL Server replaces the substring of … Read more

SQL Server STR Function

SQL Server STR Function Float to String Conversion

In this SQL Server tutorial, I will show you how to use the SQL Server STR function, where you will understand how to convert the number to a string. You will learn about how the STR() function can be useful in various situations. Then syntax of the STR() function, as well as how to check … Read more

SQL Server LTRIM Function

SQL Server LTRIM Function Remove Leading Spaces

In this SQL Server tutorial, you will learn about the SQL Server LTRIM function to remove the leading spaces from the character expression. Where you will understand the use of the LTRIM() function with literal string, and variable to remove the character from the string. Also, you will learn how to remove the specified character … Read more

SQL Server RTRIM Function

SQL Server RTRIM Function Remove Trailing Spaces From Literal String

In this SQL Server tutorial, you will learn about the SQL Server RTRIM function to truncate the spaces from the end of any string. Where you will understand the syntax of the RTRIM() function with how to use it with a literal string and variable. Also how to remove trailing characters based on the specified … Read more

CHAR Function in SQL Server

Char Function in SQL Server ASCII Code 67

In this SQL Server tutorial, I will show you how to use the CHAR function in SQL Server to get the character based on the provided integer value. You will learn about the syntax of the CHAR() function, and then find the character based on the provided code or integer value. Finally, you will understand … Read more

RIGHT Function in SQL Server

RIGHT Function in SQL Server with Product Table Column

In this SQL Server tutorial, you will learn how to use the RIGHT function in SQL Server to extract the rightmost character from the given string value. You will understand the process of extracting the characters from the right side of the literal string. Then from the string value within the table column and from … Read more

SQL Server Format Number with Commas without Decimal Places

SQL Server Format Number with Commas without Decimal Places Using Format() Function

In this SQL Server tutorial, you will learn about SQL Server format number with commas without decimal places. You will use the FORMAT() function to format the number with commas and without decimal places. Then use the LEFT() and LEN() functions together for the same purpose. SQL Server Format Number with Commas without Decimal Places … Read more

Format Number with Thousands Separator in SQL Server

Format Number with Thousands Separator in SQL Server using Format() Function

In this SQL Server tutorial, I will explain to you how to format number with thousand separator in SQL Server. You will understand use of the functions such as FORMAT(), CONVERT(), and CAST() to format numbers with thousand separators. Format Number with Thousands Separator in SQL Server While querying the information from the database, how … Read more

LEFT Function in SQL Server

LEFT Function in SQL Server Extracting Leftmost Six Characters From the String

In this SQL Server tutorial, you will learn about LEFT Function in SQL Server. You will use this function to extract the leftmost character from the value. First, you will understand how to use the LEFT() function with literal string, then use the LEFT() function with table column. Finally, with the GROUP BY clause. LEFT … Read more

CONVERT Function in SQL Server

Convert Function in SQL Server Convert Table Column Value

In this SQL Server tutorial, I will show how to use the CONVERT function in SQL Server. Where you will see how to use the CONVERT() function to convert the data type of the value to another data type in an explicit way. Also, you will learn how to apply the CONVERT() function on the … Read more