Archives of the TeradataForum
Message Posted: Mon, 17 Dec 2001 @ 20:11:11 GMT
| Subj: || || Re: Need help on sql syntax to convert values from decimal to characters |
| From: || || Marcus Diaz |
As for the case when the source is 0, you could use a case statement, something like:
CASE WHEN ID=0 '0'
ELSE trim(leading ('0') from ID(format'9(18)')(char(255))) END
I'm not sure about negative numbers, although whatever you find to solve that problem, you could add another condition in your CASE
statement for numbers less than 0.