Archives of the TeradataForum
Message Posted: Fri, 07 Dec 2007 @ 21:38:04 GMT
Subj: | | Re: Import/Export data with decimal characters |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Fri, 7 Dec 2007 14:24 -->
The "S" must come at the end of the Teradata FORMAT for zoned decimal data. Define the external field as CHAR(11) and convert on input using
either
:fld (DECIMAL(11,2),FORMAT'9(9)V9(2)S')
CAST(:fld AS DECIMAL(11,2) FORMAT '9(9)V9(2)S')
Note that only the first one is valid for FastLoad.
On output, either
(col (FORMAT '9(9)V9(2)S'))(CHAR(11))
CAST(CAST(col AS FORMAT '9(9)V9(2)S') AS CHAR(11))
Or you can specify the FORMAT as the default for the column in CREATE TABLE or ALTER TABLE, so you don't have to specify it every time on
input & output.
|