INF: Creating NOT NULL Character Fields Without Padded Blanks

ID Number: Q63238

1.11 4.20

OS/2

Summary:

For character fields defined as NOT NULL, the dbdatlen() function

returns the field width. The data is padded with blanks to the maximum

width of the field. To create tables in SQL Server that will not

blank-fill character fields for columns that require data, define the

CHAR NOT NULL fields as VARCHAR NOT NULL. If you use VARCHAR,

dbdatlen() will return the length of the character string instead of

the field width.

Additional reference words: 1.11 4.20