Progress
Embedded SQL-92
Guide and Reference
Explicit Data Conversion Using Scalar Functions
Alternatively, you can convert one data type to another data type using scalar functions. See Chapter 4, “SQL-92 Functions,” in the Progress SQL-92 Guide and Reference for additional information on scalar functions.
EXAMPLEThe following examples show two of the conversions available using scalar functions:
The first example converts the character expression ’10/10/1999’ to a DATE data type, using the TO_DATE scalar function. The result is returned in date_val_v. The second example converts character expression ’1234’ to NUMERIC type using the TO_NUMBER scalar function. The result is returned in num_val_v.
Some of the other scalar functions available for conversion are TO_CHAR and TO_TIME. See Chapter 4, “SQL-92 Functions,” in the Progress SQL-92 Guide and Reference for additional information on scalar functions.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |