Archives of the TeradataForum
Message Posted: Thu, 06 Nov 2008 @ 19:14:00 GMT
The binary length of the string can be avoided by casting the value to some specific maximum characters.This will cause some additional characters spaces if some of the records are smaller than the maximum limit. The additional spaces can be removed by adding some constants at the end of the string in SQL as shown.
SELECT cast ( COLA||'|'||COLB||'|'||COLC||'zZzZzZ' as (CHAR(100))
Using awk/shell script we can remove the constant zZzZzZ and the consequent spaces .
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|