YOUR AD GOES HERE

Extracting parts of strings: LEFT, RIGHT, SUBSTRING, LEN and DATALENGTH

Published 11, Aug 2021

SQL Server 101


Description:
In this video, we will be looking at how to extract part of strings.
My SQL Server Udemy courses are:
70-461, 70-761 Querying Microsoft SQL Server with T-SQL: https://rebrand.ly/querying-microsoft-sql-server
98-364: Database Fundamentals (Microsoft SQL Server): https://rebrand.ly/database-fundamentals
70-462 SQL Server Database Administration (DBA): https://rebrand.ly/sql-server-dba
Microsoft SQL Server Reporting Services (SSRS): https://rebrand.ly/sql-server-ssrs
SQL Server Integration Services (SSIS): https://rebrand.ly/sql-server-ssis
SQL Server Analysis Services (SSAS): https://rebrand.ly/sql-server-ssas-mdx
Microsoft Power Pivot (Excel) and SSAS (Tabular DAX model): https://rebrand.ly/microsoft-powerpivot-ssas-tabular-dax
----
My Excel for PC courses are:
Beginner to Excel - https://rebrand.ly/microsoft-excel-specialist
Intermediate to Expert Advanced - https://rebrand.ly/microsoft-excel-expert
Power Table, Get and Transform and Power Pivot - https://rebrand.ly/visualizing-data-excel
VBA macros for Excel - https://rebrand.ly/excel-vba-pc
----
We'll have a look at some familiar functions from Excel - LEFT and RIGHT. Just like in Excel, SQL Server is one-based, which means that the left-hand most character is character number 1.
Instead of MID, however, SQL Server uses SUBSTRING.
We'll look at how to get the length of a function using LEN. However, there is a hidden danger when using LEN if it has a leading space. In this case, you might want to investigate using DATALENGTH instead.

Releted More Videos

You May Also Like

YOUR AD GOES HERE

YOUR AD GOES HERE