## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> CHARINDEX[CHARINDEX]:::quoted
CHARINDEX --> End((END))
```
## Purpose
The `CHARINDEX` SQL function gets a number which is a position of the first occurrence of a search string in another string, starting looking at an optional start location.
Parameters:
- Search string: Text to search for.
- Full string: String to be searched in.
- Start Position `[optional]`: Position of string to start searching.
Returns: the position of the search string inside the full string.