Archives of the TeradataForum
Message Posted: Wed, 23 Jan 2013 @ 15:16:57 GMT
| Subj: || || Re: Data format issue |
| From: || || Geoffrey Rommel |
| ||Your problem is because there is no FORMAT statement associated with the column in the volatile table, hence it is using the
Dave and Dieter are correct, but I think the problem goes deeper. The default format associated with a column (as shown in the SHOW TABLE
output) is used only when rows are retrieved in Field Mode. Nearly all applications, including SQL Assistant, use Record Mode; BTEQ is the only
application that is likely to use Field Mode.
For this reason, you should NOT assume that a date column has any particular format. If you want to extract certain digits from a date, use
extract(year [or month or day] from date_column), or even date_column MOD 100.