The title is not as descriptive as I would have liked, my original title was too long to appear reasonably at the top of this page. I am going to describe how you can determine the length of the string of characters within a column from a DDS file or DDL table using SQL. I have found this most useful when using it within a Select statement.
This SQL function can be called by one of two names: CHARACTER_LENGTH or CHAR_LENGTH.
There is also a related function, LENGTH, that I will describe later in this post.
As its name suggests, CHARACTER_LENGTH will return the length of a string expression. In the following example I am using the VALUES SQL statement with CHARACTER_LENGTH:
01 VALUES CHARACTER_LENGTH('A ')
|




On Tuesday May 26, 6:30 PM (CT), The