Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 12 Jul 2005 @ 10:25:27 GMT

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

Subj:   Re: FORMAT Issue with FLOAT datatype?
From:   David Wellman


There is a (documented) limit of 20 digits in a format clause. Your original format clause in the DDL contained 21 digits. The explicit format clause that worked in Bteq contains only 20 digits, the one that failed contains 21.

The reason that Queryman works is because it (as you say) ignores the format clause in the DDL. The reason is:

- Teradata builds answer set rows in one of three 'modes'; Record mode, Indicator mode or Field mode.

- Bteq uses Field mode by default (see the "set indicdata" command). In this mode, the dbms returns ALL data as character (probably except for CLOB and BLOB columns), and so any FORMAT clauses specified in the SQL or the DDL are honoured. The downside is that the answer set row can be larger - a FLAOT column could be 20 characters wide.

- Record mode and Indicdata mode return data in 'internal' format, for instance a FLOAT is returned as an 8-byte number, a DATE is returned as a 4-byte number. In these cases FORMAT clauses are ignored.

- Queryman always uses Indicdata mode.



  <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: 15 Jun 2023