![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 10 Oct 2006 @ 12:51:44 GMT
Thank you Simon. But I am getting error like "3784 the number of digits specified must be between 1 and 18", If decimal(20,2). Hi All, I have modified query like :
Select Substr(TableData,3,45) a
, Trim(trailing ',' From Trim(Cast(Substr(TableData,48,20)as decimal (18,1)))) b
,Trim(trailing ',' From Trim(Cast(Substr(TableData,68,20) As decimal (18,1)))) C
From prododss.GTSTableData
Where TableCode = '00842'
;
Its working perfectly. But If I am excuting like :
Select Substr(TableData,3,45) a
, Trim(trailing ',' From Trim(Cast(Substr(TableData,48,20)as decimal (17,2)))) b
,Trim(trailing ',' From Trim(Cast(Substr(TableData,68,20) As decimal (17,2)))) C
From prododss.GTSTableData
Where TableCode = '00842'
;
Its not working why ?. If there is any other way by which we can get the same. Regards, Rao
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||