Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 07 Dec 2007 @ 21:38:04 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

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.

  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016