![]() |
|
![]() |
![]() |
Archives of the TeradataForumMessage Posted: Tue, 06 Nov 2012 @ 18:10:19 GMT
Well, one might try something like the following syntax: CAST(CAST('1234567890123456' AS DECIMAL(18,0) FORMAT '999999999999999999') AS CHAR(18)) The example starts with a string of numbers cast as a decimal(18,0) numeric value which is then formatted as 18 numerics without commas and then cast as an 18 character character string. In practical use you would substitute the numeric attribute name for the original literal argument, for example: CAST(CAST(DBName.NumericAttributeName AS DECIMAL(18,0) FORMAT '999999999999999999') AS CHAR(18)) Best, PF
| ||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||