## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> | | SHORTEN[SHORTEN]:::quoted
SHORTEN --> End((END))
```
## Purpose
The `SHORTEN` SQL function reduces a text to a maximum length. When the text exceeds the maximum length, text is removed from the middle by replacing the removed text by a shorter text.
Parameters:
- Input: Text to shorten.
- Length: Maximum length of the shortened text.
- Replacement: Text to replaced the removed text by; defaults to ellipsis ('...').
Returns: Input shortened to length.