|
|
Archives of the TeradataForum
Message Posted: Thu, 10 Jun 2004 @ 10:31:23 GMT
Subj: | | Re: How do I CAST a numeric into a numeric? |
|
From: | | tristan.bayliff |
Hi Bob,
I think the following should do what you're after. I've used a derived table as an example to create a decimal column to select off. To remove
the decimal point in the end character result, I cast as an integer which can then be trimmed to remove leading blanks and then become a left
justified character field. You should be careful of unexpected results if the decimal isn't a whole number though.
select trim(col1 (integer)) (char(20))
from (select 12345 (decimal(11,0)) ) dt (col1)
;
Cheers,
Tris Bayliff.
| |