Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 23 Feb 2015 @ 20:13:30 GMT


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


Subj:   Re: Casting to integer with ** operator resulting incorrect
 
From:   Dempsey, Mike

Eric Barner wrote:

  Database Version: Teradata 14.00.06.02 BTEQ Version: 14.00.00.16
Provider Version: Teradata.Net 15.0.0.0 SQL Assistant Version: 14.0.0.0
 


          > SELECT 2**63 ,   (  POWER(2,32) * POWER (2,31))   , POWER(2,63)  ;
          >
          >                (2**63)    (POWER(2,32)*POWER(2,31))        POWER(2,63)
          > ----------------------    -------------------------        -----------
          > From BTEQ:
          >
          > 9.22337203685478E 018           9223372036854775808        9223372036854776000
          >
          > From SQLA 14.0:
          >
          > 9.22337203685478E+18            9.22337203685478E+18       9.22337203685478E+18
          > or
          > 9223372036854780000.0000        9223372036854780000.0000   9223372036854780000.0000
          >
          >
          > SQL assistant 15.0 via TD .NET connector gives the same results as BTEQ.

If I have understood the email correctly it boils down to the results shown in the 'edited' email above.

I think the problem is that you are using SQL Assistant 14.0. SQLA 14.0 was built for use by the Beta testers of Teradata 14.0 ONLY.

This is really SQL Assistant 13.11 with a few modifications to support most of the new Teradata 14 features, but not support for the NUMBER data type. (because the connectivity providers did not support it at the time) The result is that these values are being handled as FLOAT which has a maximum accuracy of 15 digits.

The correct version of SQL Assistant for TTU 14.0/Teradata 14.0 release is 14.01.x.x The latest in that series is 14.01.0.7.

This version will give you the same results as BTEQ (and SQLA 15 or 14.10)


Mike Dempsey



     
  <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: 23 Jun 2019