|
Archives of the TeradataForumMessage Posted: Fri, 09 Jun 2006 @ 12:50:47 GMT
Hi Raghu, The logic used is, you need to cast the individual columns as CHAR(..) and then all the columns are done a CAST as CHAR(sum of all the data lenghts in the query). There must be some better way of doing but as of now I am aware of this. In the eg., that I gave, we first do CAST on col a, and col b and then one CAST AS CHAR(70) on both of these columns, its like Select CAST ( CAST (a as char(10)) ||'|'|| CAST (b as varchar(60)) AS CHAR(70)) from tablename ; And NOT as you had mentioned. (CAST (a as char(10)) ||'|'|| (CAST (CAST (b as varchar(60))) AS CHAR(70)) Also, to change column DBS_Agmt_Hist_Amt, first CAST it AS DATE and then CAST it as CHAR(10). Regards, Tanu.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||