Parameters: (String);
Returns: Decimal;
Parses the string and extracts the first numeric value found within.
If no numeric value is found, NULL is returned.
The numeric value can be positive or negative and be either integer or decimal format.
The use of a ',' as a grouping separator is NOT supported. Commas should be removed from the string first.
The use of a '.' as a decimal separator is supported.
Leading or trailing zeros will be stripped of the value.
The parameter is the string value from which the number should be extracted.
Examples:
Example 1: EXTRACT_NUMERIC_VALUE(NULL) = NULL)
Example 2: EXTRACT_NUMERIC_VALUE('Hello World') = NULL)
Example 3: EXTRACT_NUMERIC_VALUE('$240.00') = 240)
Example 4: EXTRACT_NUMERIC_VALUE('$02,540.00') = 2)
Example 5: EXTRACT_NUMERIC_VALUE('There are 3 apples in on the tree, but only 2 were picked') = 3
Comments
0 comments
Please sign in to leave a comment.