## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> TO_NUMBER[TO_NUMBER]:::quoted TO_NUMBER --> End((END)) ``` ## Purpose The `TO_NUMBER` SQL function casts a value into a `number`. Non-castable values raise an error; prevent such an error by first checking the value using [[IS_NUMBER]]. Parameters: - Input (`ANY`): value to cast. - Format: format mask. Optional; defaults to configured number format. The list of format masks is available in [[Format Masks]]. Returns: the input cast as a `number`. ## Examples The following example casts `'1234567890'` to a `number`: ```sql select to_number('1234567890') ---------------- 1234567890 ```