|
Archives of the TeradataForumMessage Posted: Thu, 24 Jan 2008 @ 23:11:06 GMT
Tony, This has never worked (at least not for me). Teradata is cutting the leading zero so you have to provide a format on which you would like to cast. Try this one: CAST ( CAST( ( extract (month from cast(DATE_FIELD as DATE FORMAT 'YYYYMMDD') ) ) AS DECIMAL(2) FORMAT '99')AS CHAR(2)) AS MONTH_ID It's not elegant but it works :) Joerg
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||