|
Archives of the TeradataForumMessage Posted: Tue, 06 Nov 2012 @ 20:55:01 GMT
Hi Sughesh, just apply a format: cast(cast(col1 as format 'Z(18)') as char(18)) But be careful, a DEC(18,0) needs 19 characters as there might be negative values: cast(cast(col1 as format '-(19)') as char(19)) Both will left align the digits with trailing blanks. If you need leading blanks/right aligned you need to switch to Teradata style casts: col1 (format '-(19)') (char(19)) Dieter
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||