Determining Column Length with System Functions

Use the char_length string function and datalength system function to determine column length.

When a char value is declared to allow NULL values, the SAP ASE server stores it internally as a varchar.

If the min or max aggregate functions are used on a char column, the result returned is varchar, and is therefore stripped of all trailing spaces.