FORMAT_STRING
Description
FORMAT_STRING
is a SQL function used for formatting strings. It generates formatted strings based on printf
style format strings. This function uses the java.util.Formatter
class and formats using Locale.US
.
Syntax
Parameter Description
- strfmt: An expression of type
STRING
that defines the format of the string. This should include formatting directives such as%d
,%s
, etc. - obj1, ...: One or more expressions of type
STRING
or numeric types, which will be formatted and inserted into the corresponding positions instrfmt
.
Return Result
This function returns a value of type STRING
, representing the formatted string.
Example
Example 1: Basic Usage
Example 2: Using Numeric Parameters
Example 3: Using Multiple Parameters