Progress
Embedded SQL-92
Guide and Reference
CHARACTER Data Type
The Progress SQL-92 data type CHARACTER (alias CHAR) corresponds to a NULL terminated character string with a maximum length of 2000 characters. The host language representation is a C Language character string.
You can use a literal character string or a host variable declared as a character array as an INPUT host variable. You must enclose string constants or literals in single or double quotes. You can also use a host variable declared as a character array as an OUTPUT host variable.
EXAMPLESThe SELECT statement in the following code fragment uses an INPUT host variable and an OUTPUT host variable, each with data type CHAR:
The city_v variable is an OUTPUT host variable, and name_v is an INPUT host variable. Each is declared as a character array in the DECLARE SECTION. An INPUT host variable can also be a character literal, as shown in this example:
You can use the scalar functions SUBSTR, INSTR, LENGTH, LOWER, and UPPER to manipulate character strings. 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 |