Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Applies to:  
Status
colourGreen
titleCelonis 4.0
 
Status
colourGreen
titleCelonis 4.2
 
Status
colourGreen
titleCelonis 4.3
 
Status
colourGreen
titleCelonis 4.4
 
Status
colourGreen
titleCelonis 4.5
 

Description

STR_TO_INT converts the input strings to integers. If the input is not a number (or outside of the supported range), null is returned. If the input is a float, the decimal places are ignored.

Supported input column types: STRING

Output column type: INT

NULL-values: If the value is NULL, the result is NULL

Syntax

Code Block
languagetext
themeDJango
STR_TO_INT ( table.column ) 

Example


Panel
borderColorgrey
Section
Convert strings to integers. The numbers 9223372036854775908 and -9223372036854775809 are outside of the supported range.

Section
Panel
titleQuery
Column1
Code Block
languagetext
themeDJango
STR_TO_INT("Table1"."Column1")
Section
Column
width50%
Panel
titleInput
Table1
Column1 : STRING
null
'123456'
'-123456.11'
'123456.11'
'123456.99'
'12345699'
'9223372036854775807'
'-9223372036854775808'
'9223372036854775908'
'-9223372036854775809'
Column
width50%
Panel
titleOutput
Result
Column1 : INT
null
123456
-123456
123456
123456
12345699
9223372036854775807
-9223372036854775808
null
null