|
|
Archives of the TeradataForum
Message Posted: Fri, 20 May 2005 @ 10:54:17 GMT
Subj: | | Re: COMPRESSing spaces |
|
From: | | Victor Sokovin |
| Is there any difference between | |
NAME CHAR(10) COMPRESS ' '
NAME CHAR(10) COMPRESS ' '
In theory, all distinct values must be specified in the COMPRESS list. However, COMPRESS does not apply to VARCHAR/CLOB columns, and with CHAR
columns the values in the column will be right-padded with blanks anyway. This means that in your NAME column, which is of the CHAR data type, you
cannot have the value of ' ' (one blank). It will be right-padded to 10 blanks.
So, in this case the first expression (10 blanks) should be the right one. In my opinion, the second one (1 blank) will not do the job of
compressing the column but I can't remember I have ever tested this.
Regards,
Victor
| |