CONVERT (Progress extension)
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
CONVERT (Progress extension)
Converts an expression to another data type. The first argument is the target data type. The second argument is the expression to be converted to that type.
The length
option for the data_type argument specifies the
length for conversions to CHAR and VARCHAR data
types. If omitted, the default is 30 bytes.
If the expression
evaluates to NULL, the result of the function is NULL.
The CONVERT function
syntax is similar to, but not compatible with, the ODBC CONVERT function.
Enclose the function in the ODBC escape clause { fn } to specify
ODBC‑compliant syntax. See the ODBC compatible CONVERT function
for more information.
Syntax
|
Notes
When data_type is CHARACTER( length )
or VARCHAR( length ), the length specification
represents the number of characters. The converted result can contain
multi‑byte characters.
Example
The
following SQL example uses the CONVERT function
to convert an INTEGER field from a system table
to a character string:
|
Compatibility
Progress extension