From the course: SQL: Data Reporting and Analysis

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Use string functions on your data

Use string functions on your data - SQL Tutorial

From the course: SQL: Data Reporting and Analysis

Use string functions on your data

- In this section we're going to look at string functions. A function is just a formula, and string just means text. So a string function is a formula that you can use on text. SQL provides lots of functions to manipulate your data, which saves you having to download it and then manipulate your data in Excel or some other package. But it's really important to know which data type you're dealing with because some of the functions will only work on numbers or dates or strings. And we are focusing ourselves on strings here. So the first one we're looking at is length, and like most functions or formulas, you use the function name, which can be in upper or lower case, then parenthesis, and the thing you're trying to measure, typically a field name, goes inside the brackets. So if we click go, we can see Penelope has eight characters, Nick has four, Ed has two, et cetera. Notice that if you're using Microsoft the function is…

Contents