Character to Varchar:
>>-VARCHAR--(--character-string-expression----+-------------+--->
'-,--integer--'
>----)---------------------------------------------------------><
Datetime to Varchar:
>>-VARCHAR--(--datetime-expression--)--------------------------><
Graphic to Varchar:
>>-VARCHAR--(--graphic-string-expression--+-------------+--)---><
'-,--integer--'
The schema is SYSIBM.
The VARCHAR function returns a varying-length character string representation of a character string, datetime value or graphic string (UCS-2 only).
The result of the function is a varying-length string (VARCHAR data type). If the first argument can be null, the result can be null; if the first argument is null, the result is the null value.
Graphic to Varchar is valid for a UCS-2 database only. For non-Unicode databases, this is not allowed.
Character to Varchar
Datetime to Varchar
Graphic to Varchar
Example:
SELECT VARCHAR(JOB)
INTO :JOB_DESC
FROM EMPLOYEE
WHERE LASTNAME = 'QUINTANA'