Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 03 Jun 2011 @ 14:33:10 GMT

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

Subj:   Re: Length Function
From:   Diehl, Robert


The first request is taking the length of a character field.

The second is taking the length of a numeric field. Length is not normal function in Teradata so I don't know what it is doing. I suspect it is using integer as the datatype and returning the internal storage size. Type() will tell you the datatype used.

     select   type ('100');
     select   type (100);

The second one returns Byteint as Teradata uses the smallest datatype that will accommodate the number.


Robert Diehl
Travelocity Data Warehouse DBA

  <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