 |
 |
Archives of the TeradataForum
Message Posted: Thu, 02 Oct 2003 @ 12:50:37 GMT
Subj: | | Re: BTEQ Export Syntax |
|
From: | | Geoffrey Rommel |
| a Date field as Char (8), Format 'yyyymmdd' | |
| a Decimal (10.2) field as Char (12), Format '-9(8).99' | |
The trick here is to remember that changing the format of a field does not change its data type. If you want a numeric field to
come out as a formatted character string, you must change both its format and its data type, like so:
cast(cast(date_field as format 'yyyymmdd') as char(8))
cast(cast(decimal_field as format '-9(8).99') as char(12))
The above applies to .export data. If you are using .export report, you may be able to get away with changing only the format.
| |