Document toolboxDocument toolbox

Length (length)

Description

Adds a new column that returns the length of a string.

How does it work in the search window?

Select Create column in the search window toolbar, then select the Length operation. You need to specify one argument:

Argument

Data type

Argument

Data type

String mandatory

string

The data type of the values in the new column is integer.

Example

In the demo.ecommerce.data table, we want to know the length of the strings in the userAgent column. To do it, we will create a new column using the Length operation.

The arguments needed to create the new column are:

  • String - userAgent column

Click Create column and you will see the following result:

How does it work in LINQ?

Use the operator select... as...  and add the operation syntax to create the new column. This is the syntax for the Length operation:

  • length(string)

Example

You can copy the following LINQ script and try the above example on the demo.ecommerce.data table. 

from demo.ecommerce.data select length(userAgent) as userAgent_