# LOCATE

Returns an integer indicating the position of a substring within another string. If the substring is not found, the function returns `0`. String positions start from `1`.

## Syntax

`LOCATE(string, substring, start)`

### Parameters

#### string

The input string in which to search for the substring.

#### substring

The substring to locate within the input string.

#### start

The start index from which to begin the search.

## Examples

Finds the position of the substring "ll" within the string "hello" and stores the result in a new column.

```esql
ROW a = "hello"
| EVAL a_ll = LOCATE(a, "ll")
```
